Skip to content

Commit

Permalink
hotfix: allow old check config format
Browse files Browse the repository at this point in the history
  • Loading branch information
Feuermagier committed May 15, 2024
1 parent 02c991f commit 8c790ff
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public static CheckConfiguration fromConfigFile(Path configFile) throws IOExcept
}

public static CheckConfiguration fromConfigString(String configString) throws IOException, LinterConfigurationException {
if (!configString.contains("problemsToReport") && configString.startsWith("[")) {
configString = "problemsToReport: " + configString;
}
var config = new ObjectMapper(new YAMLFactory()).readValue(configString, CheckConfiguration.class);
config.validate();
return config;
Expand Down

0 comments on commit 8c790ff

Please sign in to comment.