Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using mutliline freeText in warning messages #257

Closed
petertrr opened this issue Sep 9, 2020 · 0 comments · Fixed by #322
Closed

Avoid using mutliline freeText in warning messages #257

petertrr opened this issue Sep 9, 2020 · 0 comments · Fixed by #322
Assignees

Comments

@petertrr
Copy link
Member

petertrr commented Sep 9, 2020

[INFO]    [ktlint] /home/runner/work/diKTat/diKTat/diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/rules/RulesConfigReader.kt:42:5: [WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES] the declaration part of a class-like code structures (class/interface/etc.) should be in the proper order: FUN: /**
[INFO]    [ktlint]      * instead of reading the resource as it is done in the interface we will read a file by the absolute path here
[INFO]    [ktlint]      * if the path is provided, else will read the hardcoded file 'rules-config.json' from the package
[INFO]    [ktlint]      */
[INFO]    [ktlint]     override fun getConfigFile(resourceFileName: String): BufferedReader? {
[INFO]    [ktlint]         val resourceFile = File(resourceFileName)
[INFO]    [ktlint]         return if (resourceFile.exists()) {
[INFO]    [ktlint]             log.debug("Using rules-config.json file from the following path: ${resourceFile.absolutePath}")
[INFO]    [ktlint]             File(resourceFileName).bufferedReader()
[INFO]    [ktlint]         } else {
[INFO]    [ktlint]             log.debug("Using the default rules-config.json file from the class path")
[INFO]    [ktlint]             classLoader.getResourceAsStream(resourceFileName)?.bufferedReader()
[INFO]    [ktlint]         }
[INFO]    [ktlint]     }

and other examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant