Commit Graph

18 Commits

Author SHA1 Message Date
Marcelo Fabri 7ecfce34c7 Warn if a configured rule is not enabled.
Fixes #1350
2019-02-03 14:43:00 -08:00
JP Simard 0e01e07326
#2441 - Fix inaccessible custom rules in nested configurations (#2556)
* #2441 - Pass custom rules identifiers to the enableRules function to consider custom rules of a parent of a nested configuration

* #2441 - Add custom rules merge

* #2441 - Fix line length violation

* #2441 - Add nested configutaion mocks with custom rules

* #2441 - Add nested configurations tests for custom rules

* #2441 - Disable function body length check

* #2441 - Update changelog

* Move changelog to appropriate position

* Split up and refactor Configuration.init to avoid being too long

* Add tests to LinuxMain.swift

* Remove redundant protocol conformances

Hashable implies Equatable

* Fix typo in changelog entry and add another fixed issue URL
2019-01-13 15:07:27 -08:00
JP Simard ce8ea70492
Stringify swiftlint_version (#2523)
to treat any specified value that doesn't match the version string
to fail the lint.
2018-12-23 16:29:42 -08:00
JP Simard 0e862ca9c4
Enable vertical whitespace rules in SwiftLint
and fix violations
2018-12-02 14:01:23 -08:00
JP Simard dcc85fb0f3
Remove unused imports (#2382) 2018-09-02 14:09:04 -07:00
JP Simard 2bcea4b04d
Add ability for SwiftLint to lint files with full type-checked AST awareness (#2379)
* Add LintableFilesVisitor

* Move LintCommand logic into LintOrAnalyzeCommand

to prepare for the upcoming analyze command

* Add AnalyzeCommand (not fully implemented yet in SwiftLintFramework)

* Add analyzerRules configuration member

* Add AnalyzerRule protocol

* Pass compiler arguments to validate/correct

* Add requiresFileOnDisk member to RuleDescription

This will be used by AnalyzerRules because they need a file on disk
to pass in the compiler arguments to SourceKit.

* Exclusively run AnalyzerRules when the Linter has compiler arguments

* Enable testing AnalyzerRules in TestHelpers

* Add ExplicitSelfRule

* Update documentation

* Fix `analyze --autocorrect`

* Improve performance of CompilerArgumentsExtractor

* Fix lint command actually running analyze

* Move File operations in TestHelpers into a private extension

* Add analyzer column to rules command and markdown documentation

* Use a Set literal

* Make AnalyzerRule inherit from OptInRule

* Mention analyzer_rules in readme

* Mention that analyzer rules are slow
2018-09-02 00:13:27 -07:00
JP Simard b83e0991b9
Remove all file headers
The MIT license doesn't require that all files be prepended with this
licensing or copyright information. Realm confirmed that they're ok with this
change. This will enable some companies to contribute to SwiftLint and the
date & authorship information will remain accessible via git source control.
2018-05-04 13:42:02 -07:00
JP Simard e70710bedb
Don't log if `indentation` isn't set in config
Fixes #1998
2018-01-10 10:08:39 -08:00
JP Simard 34d2fb3949
Move Configuration.defaultIndentation() to IndentationStyle init 2018-01-03 23:31:12 -08:00
JP Simard fa13551af1
Rename Configuration.Indentation to IndentationStyle
and move to its own file
2018-01-03 23:21:23 -08:00
Noah McCann ab29b75d20
Addressed most linting errors 2018-01-03 23:05:48 -08:00
Noah McCann 093367073a
Renamed IndentationMode to Indentation, better handled default value 2018-01-03 23:05:48 -08:00
Noah McCann 38f869bf81
Added indentationMode to configuration, updated parsing to handle it 2018-01-03 23:05:48 -08:00
Marcelo Fabri 53380531ff Improve unneeded_parentheses_in_closure_argument 2017-08-29 16:43:56 -03:00
JP Simard b829893b7d
lower ACL of declarations that should be private 2017-08-08 09:10:31 -07:00
Stéphane Copin 3ad4842bcd
Small changes and refactoring based on github Feedback 2017-08-02 13:05:26 -07:00
Stéphane Copin 9f1f454cf9
Refactor the way Configuration objects are created with regards to rules 2017-08-02 13:05:26 -07:00
JP Simard 40bd4e7d4f
move parsing functionality to Configuration+Parsing 2017-07-17 12:05:05 -07:00