MaxLineLength should allow excluding import and package statements
See original GitHub issueHey,
Another issue i found is MaxLineLength, which is not working, i changed it to 15 just to see the results, and build has succeed with no warns or errors.
detekt.yml part:
style:
active: true
WildcardImport:
active: false
MaxLineLength:
active: true
maxLineLength: 15
NamingConventionViolation:
active: true
variablePattern: '^(_)?[a-z$][a-zA-Z$0-9]*$'
constantPattern: '^([A-Z_]*|serialVersionUID)$'
methodPattern: "^[`]?[a-z$'][a-zA-Z$0-9]*[`]?$"
classPattern: '[A-Z$][a-zA-Z$]*'
enumEntryPattern: '^[A-Z$][a-zA-Z_$]*$'
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (4 by maintainers)
Top Results From Across the Web
Style Rule Set - Detekt
This rule verifies spacing between package and import statements as well as between import statements and class declarations. Active by default: No. Debt:...
Read more >Configuration options for isort
The max length of an import line (used for wrapping long imports). Type: Int Default: 79. Config default: 79. Python & Config File...
Read more >How to disable eslint rule max line length for paragraph in ...
Original Answer · The same solution works also for npm package.json, esLintConfig section. · There is a way to disable rules for a...
Read more >Size Violations - Checkstyle
Therefore, long anonymous inner classes should usually be refactored into ... To configure check to validate import and package statements:.
Read more >Full Listing of Options and Their Descriptions - Flake8
Command-line example: flake8 --exclude=*.pyc dir/. This can be specified in config files. Example config file usage: exclude = .tox, __pycache__.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@arturbosch Will do that on the weekend 👍
Puh, I actually do not like that you can exclude classes, methods or properties etc. If you are on the level where you want to exclude whole classes etc then just turn off the rule … or use
@Suppress
or add this findings to your white- or blacklist, create a baseline. So many options.For package decl and import stmt’s I see the need if your company has an extravagant name 😄.
@Mauin go for
excludeImports
andexcludePackages
, both false on default. All agree 😄 ?