Skip to content

Commit

Permalink
Linting 2
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenLooman committed Sep 3, 2023
1 parent afbfeb0 commit bc068ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ private boolean isCheckEnabled(final MagikFile magikFile, final Class<?> checkCl
final Path configPath = MagikSettings.INSTANCE.getChecksOverrideSettingsPath() != null
? MagikSettings.INSTANCE.getChecksOverrideSettingsPath()
: ConfigurationLocator.locateConfiguration(searchPath);
final Configuration config = new Configuration(configPath);
final Configuration config = configPath != null
? new Configuration(configPath)
: new Configuration();
final List<MagikCheckHolder> allChecks = MagikLint.getAllChecks(config);
for (final MagikCheckHolder checkHolder : allChecks) {
if (checkHolder.getCheckClass().equals(checkClass)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ private boolean isCheckEnabled(final MagikFile magikFile, final Class<?> checkCl
final Path configPath = MagikSettings.INSTANCE.getChecksOverrideSettingsPath() != null
? MagikSettings.INSTANCE.getChecksOverrideSettingsPath()
: ConfigurationLocator.locateConfiguration(searchPath);
final Configuration config = new Configuration(configPath);
final Configuration config = configPath != null
? new Configuration(configPath)
: new Configuration();
final List<MagikCheckHolder> allChecks = MagikLint.getAllChecks(config);
for (final MagikCheckHolder checkHolder : allChecks) {
if (checkHolder.getCheckClass().equals(checkClass)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static void resetCache() {
* @param searchPath Path to start looking from, a directory.
* @return Return the path to the configuration to use.
*/
@CheckForNull
public static Path locateConfiguration(final Path searchPath) {
LOGGER.trace("Search path: {}", searchPath.toAbsolutePath());

Expand Down

0 comments on commit bc068ba

Please sign in to comment.