Commit Graph

220 Commits

Author SHA1 Message Date
Scott Hoyt 0691b79a08 Rename Rule Configurations. 2016-01-23 17:42:13 -08:00
Scott Hoyt 84aa4793bc Fixed description for VariableNameRule to reflect new responsibility. 2016-01-23 17:42:13 -08:00
Scott Hoyt ddcde17f04 Add min and max length checking responsibilities to VariableNameRule. 2016-01-23 17:42:13 -08:00
Scott Hoyt 873edb724b Provided convenience property params for RuleLevelsConfig. 2016-01-23 17:42:13 -08:00
Scott Hoyt 05a65afc72 Removed ViolationLeveLRule in favor of ConfigurationProviderRule. 2016-01-23 17:42:13 -08:00
Scott Hoyt 0b61c63937 Extracted Rule Configuration structs to own files. 2016-01-23 17:42:13 -08:00
Scott Hoyt 0883f56424 Rename Rule Configuration structures. 2016-01-23 17:42:13 -08:00
Scott Hoyt 4ad287d25a Fixed TypeNameRule to match previous definition. 2016-01-23 17:42:13 -08:00
Scott Hoyt 6522addc10 TypeNameRule conforms to ConfigurationProviderRule. 2016-01-23 17:42:13 -08:00
Scott Hoyt ccbcb537b5 Convert ConfigurableRule to throwing init instead of failing. 2016-01-23 17:42:13 -08:00
JP Simard d5598d4eae add missing imports needed by SPM 2016-01-22 21:09:28 -08:00
JP Simard 61920d2ab7 avoid Swift 2.2 deprecations 2016-01-22 21:09:28 -08:00
JP Simard ace0999154 update SourceKitten to 0.8.0 2016-01-22 19:19:15 -08:00
Norio Nomura 7c4b7f34ac Reduce creation of Location
Performance improvement is small on real usage.
But, it reduces the duration of `make test`
from:
```
…
✓ testTypeBodyLengths (15.942 seconds)
…
Executed 70 tests, with 0 failures (0 unexpected) in 22.355 (22.393) seconds
```
to:
```
…
✓ testTypeBodyLengths (8.197 seconds)
…
Executed 70 tests, with 0 failures (0 unexpected) in 14.455 (14.500) seconds
```
2016-01-23 11:59:56 +09:00
Marcelo Fabri d68161da96 Renaming functions to make clear that whitespace only lines are ignored too 2016-01-21 22:29:38 -08:00
Marcelo Fabri 3416217927 TypeBodyLengthRule should not count comment and whitespace lines 2016-01-21 22:29:38 -08:00
JP Simard bf08125cc3 rewrite some private functions in MissingDocsRule to compile 7x faster
before: 451.5ms
  436.5ms inheritedMembersForDictionary
  9.2ms declarationOverrides
  5.8ms dictArrayForDictionary

after: 60.6ms
  11.0ms inheritedMembersForDictionary
  0.9ms declarationOverrides
  48.7ms mappedDictValues
2016-01-18 13:52:37 -08:00
Marcelo Fabri 75a4f2f2dc Changing reason message 2016-01-14 21:24:24 -08:00
Marcelo Fabri 12eb3fece7 Updating reason message 2016-01-14 20:47:17 -08:00
Marcelo Fabri 579872cd30 Handling multiline comments and correcting line count on violation reason 2016-01-14 20:26:20 -08:00
Marcelo Fabri ea33640296 Caching 2016-01-14 20:25:51 -08:00
Marcelo Fabri 72f401497d Refactoring 2016-01-14 20:25:51 -08:00
Marcelo Fabri 07c076689b Address performance issues 2016-01-14 20:24:47 -08:00
Marcelo Fabri 04b2510926 FunctionBodyLengthRule should not count comment lines 2016-01-14 20:24:47 -08:00
Scott Hoyt 39d59c662a Changed MissingDocsRule to ConfigurableRule. 2016-01-14 08:52:47 -08:00
Scott Hoyt 3a134b2338 Migrated FileLengthRule to ViolationLevelRule. 2016-01-13 19:45:27 -08:00
Scott Hoyt 62a0d83f9b Migrated FunctionBodyLengthRule to ViolationLevelRule. 2016-01-13 19:45:27 -08:00
Scott Hoyt 9f7ea52f9f Migrated LineLengthRule to ViolationLevelRule. 2016-01-13 19:45:27 -08:00
Scott Hoyt 5c5335d504 Migrated TypeBodyLengthRule to ViolationLevelRule. 2016-01-13 19:45:27 -08:00
Scott Hoyt 5f39bea9b2 Migrated VariableNameMaxLengthRule to ViolationLevelRule. 2016-01-13 19:45:27 -08:00
JP Simard f56875bb87 fix spacing issues in LegacyConstructorRule 2016-01-13 17:56:53 -08:00
JP Simard 3fef742136 fix a few mistakes in legacy constructor corrections 2016-01-13 17:55:19 -08:00
Aaron McTavish f877bc2d25 Resolved issues based on feedback from @jpsim 2016-01-13 17:17:41 -08:00
Aaron McTavish 20dbbe81b7 Implement LegacyConstantRule
From #319

CGGeometry: Prefer struct-scope constants CGRect.infinite, CGRect.null,
etc. over global constants CGRectInfinite, CGRectNull, etc.
2016-01-13 17:17:35 -08:00
JP Simard 77d2dd4e08 make MissingDocsRule parameterizable again 2016-01-13 16:41:09 -08:00
JP Simard 7f34efccbf make missing_docs rule opt-in 2016-01-13 16:41:09 -08:00
JP Simard 6f73c7632e [MissingDocsRule] skip overridden members when checking for missing docs 2016-01-13 16:41:09 -08:00
JP Simard a5eb7c64fb [MissingDocsRule] skip inherited members when checking for missing docs 2016-01-13 16:41:08 -08:00
JP Simard 4e461bc9ba use shorter ACL strings when parameterizing MissingDocsRule
also fix the integration tests by using the configuration file
2016-01-13 16:41:02 -08:00
JP Simard 139329cd33 parameterized MissingDocsRule on AccessControlLevel 2016-01-13 15:59:49 -08:00
JP Simard a2f06246d0 improve MissingDocsRule
by checking for documentation comment body rather than doc comment attribute
2016-01-13 15:59:37 -08:00
JP Simard 9eabd45ce5 add "Missing Docs" rule 2016-01-13 15:59:37 -08:00
JP Simard 4c52163a70 add rule to encourage checking isEmpty over comparing count to zero 2016-01-13 15:41:25 -08:00
JP Simard e13907ead3 fix infinite regex search & 'where' false positive in ConditionalBindingCascadeRule 2016-01-12 18:35:31 -08:00
JP Simard 7268d373cc minor tweaks from #314 2016-01-12 11:41:33 -08:00
Scott Hoyt 647371517e Extracted arrayOf to Array extension and used to simplify VariableNameMinLengthRule.init?(config:). 2016-01-11 13:10:17 -08:00
Scott Hoyt 55fa348b6d Made ParameterizedRule protocol inherit from ConfigurableRule with default implementation for conformance. 2016-01-11 11:21:49 -08:00
Scott Hoyt 8d6f1ad1d7 Added [Int] support for VariableNameMinLengthRule configuration. 2016-01-11 11:21:49 -08:00
Scott Hoyt 23265f0ff6 Changed VariableNameMinLengthRule.isEqualTo to use a guard. 2016-01-11 11:21:49 -08:00
Scott Hoyt 30e7018532 Fixed typo in rule name and reattributed. 2016-01-11 11:21:49 -08:00