-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/SwaLint-Core.package/SLDefaultDialog.class/class/defaultFastSelectionTests.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
instance-creation | ||
defaultFastSelectionTests | ||
|
||
^ { #smallLintUnconditionalRecursion . #instanceVariableAccessIsConsistent: . #collectionProtocolRule: . #smallLintJustSendsSuper . #smallLintTempsReadBeforeWritten . #unnecessaryAssignmentRule: . #smallLintConsistencyCheck . #longMethods: . #smallLintDetectContains . #smallLintToDoWithIncrement . #smallLintEqualNotUsed . #smallLintModifiesCollection . #smallLintOverridesSpecialMessage . #lawOfDemeterRule: . #smallLintAbstractClass . #smallLintCollectSelectNotUsed . #smallLintOnlyReadOrWrittenVariable . #smallLintMethodModifierFinal . #smallLintMissingYourself . #smallLintUndeclaredReference . #smallLintOnlyReadOrWrittenTemporary . #smallLintUsesTrue . #dotAfterReturn: . #smallLintFloatEqualityComparison } asSet | ||
^ { #smallLintUnconditionalRecursion . #instanceVariableAccessIsConsistent: . #collectionProtocolRule: . #smallLintJustSendsSuper . #smallLintTempsReadBeforeWritten . #unnecessaryAssignmentRule: . #smallLintConsistencyCheck . #longMethods: . #smallLintDetectContains . #smallLintToDoWithIncrement . #smallLintEqualNotUsed . #smallLintModifiesCollection . #smallLintOverridesSpecialMessage . #lawOfDemeterRule: . #smallLintAbstractClass . #smallLintCollectSelectNotUsed . #smallLintOnlyReadOrWrittenVariable . #smallLintMethodModifierFinal . #smallLintMissingYourself . #smallLintUndeclaredReference . #smallLintOnlyReadOrWrittenTemporary . #smallLintUsesTrue . #dotAfterReturn: . #smallLintFloatEqualityComparison. #suspiciousAuthorInitials: } asSet |
2 changes: 1 addition & 1 deletion
2
packages/SwaLint-Core.package/SLDefaultDialog.class/class/defaultFullSelectionTests.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
instance-creation | ||
defaultFullSelectionTests | ||
|
||
^ { #smallLintExcessiveArguments . #smallLintEquivalentSuperclassMethods . #smallLintUnclassifiedMethods . #lawOfDemeterRule: . #noClassComments: . #smallLintMissingYourself . #smallLintOnlyReadOrWrittenVariable . #unnecessaryAssignmentRule: . #smallLintBooleanPrecedence . #smallLintAbstractClass . #smallLintMissingSuperSends . #ifTrueReturnsRule: . #smallLintReturnsIfTrue . #smallLintCollectionMessagesToExternalObject . #smallLintConsistencyCheck . #smallLintCollectionCopyEmpty . #smallLintFloatEqualityComparison . #smallLintUnreferencedVariables . #smallLintMethodModifierOverride . #brainMethod: . #smallLintOnlyReadOrWrittenTemporary . #smallLintYourselfNotUsed . #godClass: . #smallLintExcessiveMethods . #magicNumbers: . #instVarInAllSubclasses: . #collectionProtocolRule: . #smallLintDefinesEqualNotHash . #badlyFormattedMethods: . #smallLintUnconditionalRecursion . #smallLintLiteralArrayContainsComma . #smallLintLiteralArrayContainsDot .#smallLintTempsReadBeforeWritten . #smallLintMissingSubclassResponsibility . #instanceVariableAccessIsConsistent: . #smallLintEqualNotUsed . #smallLintAddRemoveDependents . #smallLintMethodModifierFinal . #smallLintModifiesCollection . #smallLintRefersToClass . #smallLintThreeElementPoint . #precedenceRule: . #brainClass: . #smallLintCollectSelectNotUsed . #featureEnvy: . #smallLintInconsistentMethodClassification . #smallLintUsesTrue . #smallLintJustSendsSuper . #smallLintDetectContains . #metaProgramming: . #smallLintTemporaryVariableCapitalization . #smallLintAssignmentWithoutEffect . #smallLintOverridesSpecialMessage . #smallLintUndeclaredReference . #smallLintEqualsTrue . #smallLintToDoWithIncrement . #smallLintExcessiveVariables . #longMethods: . #dotAfterReturn: } asSet | ||
^ { #smallLintExcessiveArguments . #smallLintEquivalentSuperclassMethods . #smallLintUnclassifiedMethods . #lawOfDemeterRule: . #noClassComments: . #smallLintMissingYourself . #smallLintOnlyReadOrWrittenVariable . #unnecessaryAssignmentRule: . #smallLintBooleanPrecedence . #smallLintAbstractClass . #smallLintMissingSuperSends . #ifTrueReturnsRule: . #smallLintReturnsIfTrue . #smallLintCollectionMessagesToExternalObject . #smallLintConsistencyCheck . #smallLintCollectionCopyEmpty . #smallLintFloatEqualityComparison . #smallLintUnreferencedVariables . #smallLintMethodModifierOverride . #brainMethod: . #smallLintOnlyReadOrWrittenTemporary . #smallLintYourselfNotUsed . #godClass: . #smallLintExcessiveMethods . #magicNumbers: . #instVarInAllSubclasses: . #collectionProtocolRule: . #smallLintDefinesEqualNotHash . #badlyFormattedMethods: . #smallLintUnconditionalRecursion . #smallLintLiteralArrayContainsComma . #smallLintLiteralArrayContainsDot .#smallLintTempsReadBeforeWritten . #smallLintMissingSubclassResponsibility . #instanceVariableAccessIsConsistent: . #smallLintEqualNotUsed . #smallLintAddRemoveDependents . #smallLintMethodModifierFinal . #smallLintModifiesCollection . #smallLintRefersToClass . #smallLintThreeElementPoint . #precedenceRule: . #brainClass: . #smallLintCollectSelectNotUsed . #featureEnvy: . #smallLintInconsistentMethodClassification . #smallLintUsesTrue . #smallLintJustSendsSuper . #smallLintDetectContains . #metaProgramming: . #smallLintTemporaryVariableCapitalization . #smallLintAssignmentWithoutEffect . #smallLintOverridesSpecialMessage . #smallLintUndeclaredReference . #smallLintEqualsTrue . #smallLintToDoWithIncrement . #smallLintExcessiveVariables . #longMethods: . #dotAfterReturn:. #suspiciousAuthorInitials: } asSet |
4 changes: 2 additions & 2 deletions
4
packages/SwaLint-Core.package/SLDefaultDialog.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/SwaLint-PlugIns.package/SLMiscPlugIn.class/instance/suspiciousAuthorInitials..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
method tests | ||
suspiciousAuthorInitials: aMethodTestObject | ||
<slTestName: 'Method has suspicious author initials' | ||
description: 'Every method should have the initials of its latest author in its time stamp. This test finds methods whose author initials look suspicious and have perhaps been created by a tool. To fix invalid author initials, you can accept the method again in a browser.' | ||
category: 'Miscellaneous'> | ||
|
||
| authorInitials suspicious | | ||
aMethodTestObject ifClassTestChildrenWith: #suspiciousAuthorInitials:. | ||
aMethodTestObject shouldBeMethod. | ||
authorInitials := aMethodTestObject testObject timeStamp ifNotNil: [:stamp | | ||
stamp findTokens at: 1 ifAbsent: nil]. | ||
|
||
suspicious := authorInitials isEmptyOrNil not and: | ||
[(authorInitials copyWithout: '0123456789/') isEmpty | ||
or: [#('programmatic' 'smalltalkCI' '*test*') anySatisfy: [:pattern | pattern match: authorInitials]]]. | ||
|
||
^ (self booleanResult: suspicious) | ||
showOnlyIfTrue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...waLintBrowser.package/SL2DefaultTestMapper.class/instance/mapSuspiciousAuthorInitials..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
map - 2. code quality - metadata | ||
mapSuspiciousAuthorInitials: aSLTestData | ||
<sl2Test: #suspiciousAuthorInitials> | ||
|
||
^ (self makeTestFrom: aSLTestData) | ||
addCategoryPath: #('code quality' 'metadata'); | ||
yourself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters