Commit Graph

393 Commits

Author SHA1 Message Date
Scott Hoyt 8ff15625c4 Added exclusions to TypeNameRule. 2016-01-23 17:42:13 -08:00
Scott Hoyt cd5f4570c6 Switched to Set for excluded for performance and semantics. 2016-01-23 17:42:13 -08:00
Scott Hoyt 1f13e1621a Renamed return nil to return .None for semantics. 2016-01-23 17:42:13 -08:00
Scott Hoyt 60546e4c0d Renamed violationSeverity to severity for brevity. 2016-01-23 17:42:13 -08:00
Scott Hoyt 3230c6413e Replaced things in rule configurations named configuration for config to save space. 2016-01-23 17:42:13 -08:00
Scott Hoyt 421aa6e4c8 Added tests for NameConfig. 2016-01-23 17:42:13 -08:00
Scott Hoyt a64f9eddbd SeverityLevelConfig stores levels as Ints now. 2016-01-23 17:42:13 -08:00
Scott Hoyt 53e30574e1 Extracted violationSeverity to NameConfig. 2016-01-23 17:42:13 -08:00
Scott Hoyt 20e8038a91 Changed min/max names to reflect that they belong to name length. 2016-01-23 17:42:13 -08:00
Scott Hoyt bf5a569104 Renamed MinMaxLengthConfig to NameConfig to reflect combined responsibilities. 2016-01-23 17:42:13 -08:00
Scott Hoyt d137dcdbf2 Remove VariableNameRuleConfig in leu of adding excluded to MinMaxLengthConfig. Reduced length of length violation message. 2016-01-23 17:42:13 -08:00
Scott Hoyt 810f813d70 Add min/max thresholds to MinMaxLengthConfig for convenience. 2016-01-23 17:42:13 -08:00
Scott Hoyt d2c697d1bc Rename dictionary keys for length config. 2016-01-23 17:42:13 -08:00
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 6d385736c9 Delete unused ViolationLevelConfiguration protocol. 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 d2ec3fb621 Added associated type for ConfigurationProviderRule. 2016-01-23 17:42:13 -08:00
Scott Hoyt 619a3450c2 Fix spacing. 2016-01-23 17:42:13 -08:00
Scott Hoyt 1a2bb1be79 Add MinMaxConfiguration. 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
Scott Hoyt 21abbd345f Added ViolationLevelConfiguration. 2016-01-23 17:42:13 -08:00
Scott Hoyt d300eec7cf Added ConfigurationProviderRule 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 b17b0f6e7d Minor refactoring 2016-01-21 22:33:21 -08: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 c9246542ad fix infinite recursion when using nested config files. Fixes #368 2016-01-21 12:49:04 -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
JP Simard 9acc4c56b3 rewrite Location.description to compile 25x faster
before: 1097.1ms
after: 44.2ms
2016-01-18 13:52:37 -08:00
JP Simard 512c3c695d rewrite XcodeReporter.generateForSingleViolation to compile 200x faster
before: 6056.5ms
after: 28.2ms
2016-01-18 13:52:37 -08:00
JP Simard 59db289356 rewrite CheckstyleReporter.generateReport to compile 100x faster
before: 10s
after: 100ms
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 811cfd152e Clearing syntaxKindsByLinesCache 2016-01-14 20:25:51 -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 08ad3d333b Fix comparision when startLine or endLine is nil 2016-01-14 20:24:47 -08:00
Marcelo Fabri 07c076689b Address performance issues 2016-01-14 20:24:47 -08:00
Marcelo Fabri 57cf38a388 Fix identation 2016-01-14 20:24:47 -08:00