mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-27 11:10:57 -05:00
6fdc091361
Certain linters and formatters support fixing linting and formatting issues (fix mode). Before this change, Super-linter runs linters and formatters in a mode that doesn't modify the source code in any way (check only mode). With this change, Super-linter supports running linters and formatters in fix mode if explicitly requested by the configuration. If the configuration includes a variable named FIX_<language_name>, Super-linters modifies the command to run the linter or formatter for <language_name> to enable fix mode. The modifications to the linter or formatter command that Super-linter applies depend on what is the default for a particular linter: it either removes or adds options to the command to run the linter or formatter.
11 lines
341 B
Groovy
11 lines
341 B
Groovy
// disable ClassNameSameAsFilename because super-linter follows a specific
|
|
// file name for tests.
|
|
// groovylint-disable-next-line ClassNameSameAsFilename
|
|
class Example {
|
|
|
|
static void main(String[] args) {
|
|
File file = new File('E:/Example.txt')
|
|
println "The file ${file.absolutePath} has ${file.length()} bytes"
|
|
}
|
|
|
|
}
|