-
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.
Add a Linter to the CI to make codestyle more consistent.
- Loading branch information
Showing
78 changed files
with
521 additions
and
3 deletions.
There are no files selected for viewing
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,20 @@ | ||
name: CI-Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
smalltalk: [ Squeak64-5.3 ] | ||
name: ${{ matrix.smalltalk }} on ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: hpi-swa/setup-smalltalkCI@v1 | ||
with: | ||
smalltalk-version: ${{ matrix.smalltalk }} | ||
- run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.lint.ston | ||
shell: bash | ||
timeout-minutes: 15 |
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,17 @@ | ||
SmalltalkCISpec { | ||
#loading : [ | ||
SCIMetacelloLoadSpec { | ||
#baseline : 'SVGMorph', | ||
#platforms : [ #squeak ], | ||
#directory : 'packages', | ||
#load : [ 'linter' ], | ||
#useLatestMetacello : true | ||
} | ||
], | ||
#preLoading : [ | ||
'scripts/preLoading.st' | ||
], | ||
#testing : { | ||
#classes : [ #SVGLinterTests ] | ||
} | ||
} |
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
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,2 @@ | ||
{"propertyFileExtension" : ".json", | ||
"packageExtension" : ".package" } |
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
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,4 @@ | ||
{ | ||
"noMethodMetaData" : true, | ||
"separateMethodMetaAndSource" : false, | ||
"useCypressPropertiesFile" : true } |
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,5 @@ | ||
SquotTrackedObjectMetadata { | ||
#objectClassName : #PackageInfo, | ||
#objectsReplacedByNames : true, | ||
#serializer : #SquotCypressCodeSerializer | ||
} |
1 change: 1 addition & 0 deletions
1
packages/Tests-SVG-Linter.package/SVGLinterTests.class/README.md
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 @@ | ||
LinterTests is the PR validation mechanism used to enforce linter compliance before merge. Individual rules are added as tests and required to have zero offenses. |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/arbitraryCodeRule..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,4 @@ | ||
private | ||
arbitraryCodeRule: aRule | ||
|
||
self arbitraryCodeRule: aRule plugIn: SLSmallLintPlugIn. |
16 changes: 16 additions & 0 deletions
16
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/arbitraryCodeRule.plugIn..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,16 @@ | ||
private | ||
arbitraryCodeRule: aRule plugIn: aPlugIn | ||
|
||
| failures failingTestObjects result | | ||
|
||
failingTestObjects := OrderedCollection new. | ||
failures := ((SLTestRunner new environment: (self environmentFor: aPlugIn withRule: aRule)) | ||
runOnTests: {aRule} | ||
andTestObjects: self classTestObjects) select: [:testObject | | ||
result := testObject resultOf: aRule. | ||
result isSummary | ||
ifTrue: [ | ||
failingTestObjects addAll: (testObject methods select: [:each | result summarizingCondition value: (each resultOf: result summarizedTest)]). | ||
result > 0] | ||
ifFalse: [result isNegative]]. | ||
self assert: failures isEmpty description: 'Failures in: ', failures asString |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/classTestObjects..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,4 @@ | ||
accessing | ||
classTestObjects: aCollection | ||
|
||
classTestObjects := aCollection. |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/classTestObjects.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,4 @@ | ||
accessing | ||
classTestObjects | ||
|
||
^ classTestObjects |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/classes..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,4 @@ | ||
accessing | ||
classes: aCollection | ||
|
||
classes := aCollection. |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/classes.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,4 @@ | ||
accessing | ||
classes | ||
|
||
^ classes |
6 changes: 6 additions & 0 deletions
6
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/environmentFor.withRule..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,6 @@ | ||
private | ||
environmentFor: aPlugIn withRule: aRule | ||
|
||
^ aPlugIn = SLSmallLintPlugIn | ||
ifTrue: [SVGScopedEnvironment newFor: self classTestObjects test: aRule plugIn: SLSmallLintPlugIn] | ||
ifFalse: [SLDefaultEnvironment new] |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/hasTrailingWhitespaces..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,4 @@ | ||
private | ||
hasTrailingWhitespaces: aString | ||
|
||
^ (self isLineWithOnlyTabsAndSpaces: aString) not and: [aString last = Character space or: [aString last = Character tab]] |
10 changes: 10 additions & 0 deletions
10
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/initialize.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,10 @@ | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
|
||
self | ||
classes: ((SystemNavigation default allClasses | ||
select: [:aClass | | ||
(aClass class category beginsWith: 'SVG')])); | ||
classTestObjects: (self classes collect: [:anObject | anObject as: SLTestObject]). |
4 changes: 4 additions & 0 deletions
4
...es/Tests-SVG-Linter.package/SVGLinterTests.class/instance/isLineWithOnlyTabsAndSpaces..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,4 @@ | ||
private | ||
isLineWithOnlyTabsAndSpaces: aString | ||
|
||
^ aString isEmpty or: [aString allSatisfy: [:aChar | aChar = Character space or: [aChar = Character tab]]] |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/methodTestObjects.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,4 @@ | ||
accessing | ||
methodTestObjects | ||
|
||
^ (self classTestObjects collect: [:aClassTestObject | aClassTestObject methods]) flatten |
11 changes: 11 additions & 0 deletions
11
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/methodsLinesDo..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,11 @@ | ||
private | ||
methodsLinesDo: aBlock | ||
|
||
self methodTestObjects do: [:aSLMethodTestObject | | ||
| lines | | ||
lines := aSLMethodTestObject sourceCode string lines. | ||
((lines size >= 2) and: [lines second includesSubstring: '"@linter-ignore"']) | ||
ifFalse: [ | ||
aBlock value: lines | ||
] | ||
] |
9 changes: 9 additions & 0 deletions
9
.../Tests-SVG-Linter.package/SVGLinterTests.class/instance/methodsLinesDo.excludeClasses..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,9 @@ | ||
private | ||
methodsLinesDo: aBlock excludeClasses: aCollection | ||
|
||
self methodTestObjects do: [:aSLMethodTestObject | | ||
(aCollection includes: (aSLMethodTestObject parent testClass)) | ||
ifFalse: [ | ||
aBlock value: aSLMethodTestObject sourceCode string lines | ||
] | ||
] |
15 changes: 15 additions & 0 deletions
15
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testAssertOrder.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,15 @@ | ||
tests | ||
testAssertOrder | ||
|
||
"Checks if the arguments of assert: equals: are passed in the right order. | ||
A Constant should be the first argument, otherwise the arguments appear | ||
in the wrong order in the title of the debugger error message." | ||
self methodsLinesDo: [:lines | | ||
lines do: [:line | | ||
(line matchesRegex: '.*self assert\: .*equals\: .*') ifTrue: [ | ||
| firstWordAfterEquals | | ||
firstWordAfterEquals := (((line splitBy: 'equals: ') second) splitBy: ' ') first. | ||
[self assert: ((Compiler evaluate: firstWordAfterEquals) isNil).] on: Error do: [''] | ||
] | ||
] | ||
] |
18 changes: 18 additions & 0 deletions
18
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testCorrectClassPrefix.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 @@ | ||
tests | ||
testCorrectClassPrefix | ||
|
||
self classes do: [:aClass | | ||
(aClass class category endsWith: 'Client-Core') | ||
ifTrue: [self assert: (aClass class name beginsWith: 'TCC')]. | ||
|
||
(aClass class category endsWith: 'Client-UI') | ||
ifTrue: [self assert: (aClass class name beginsWith: 'TCU')]. | ||
|
||
(aClass class category endsWith: 'Tests-Core') | ||
ifTrue: [self assert: (aClass class name beginsWith: 'TCTC')]. | ||
|
||
(aClass class category endsWith: 'Tests-UI') | ||
ifTrue: [self assert: (aClass class name beginsWith: 'TCTU')]. | ||
|
||
(aClass class category endsWith: 'Tests-Misc') | ||
ifTrue: [self assert: (aClass class name beginsWith: 'TCTM')]]. |
8 changes: 8 additions & 0 deletions
8
...es/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testDefaultValuesOnClassSide.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,8 @@ | ||
tests | ||
testDefaultValuesOnClassSide | ||
|
||
self methodTestObjects | ||
reject: [:method | method methodName = 'defaultTimeout'] | ||
thenDo: [:method | (method methodName beginsWith: 'default') ifTrue: | ||
[self assert: method classSide] | ||
]. |
5 changes: 5 additions & 0 deletions
5
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testIfTrueReturnsRule.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,5 @@ | ||
tests | ||
testIfTrueReturnsRule | ||
|
||
"replace IfTrue ifFalse branches with the shorter bool equivalent if possible" | ||
self arbitraryCodeRule: #ifTrueReturnsRule: plugIn: SLRBImportPlugIn. |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testInstanceVarAccess.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,4 @@ | ||
tests | ||
testInstanceVarAccess | ||
|
||
self arbitraryCodeRule: #instanceVariableAccessIsConsistent: plugIn: SLSwaMetricsPlugIn. |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testLongMethods.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,4 @@ | ||
tests | ||
testLongMethods | ||
|
||
self methodsLinesDo: [:lines | self assert: lines size <= 20] |
5 changes: 5 additions & 0 deletions
5
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testMethodHasEmptyLine.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,5 @@ | ||
tests | ||
testMethodHasEmptyLine | ||
|
||
"also rejects method with tabs or spaces in second line" | ||
self methodsLinesDo: [:lines | self assert: (lines size < 2 or: [self isLineWithOnlyTabsAndSpaces: lines second])]. |
9 changes: 9 additions & 0 deletions
9
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testMethodNameIsLowerCase.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,9 @@ | ||
tests | ||
testMethodNameIsLowerCase | ||
|
||
self methodsLinesDo: [:lines | | ||
| firstChar | | ||
firstChar := lines first first. | ||
firstChar isLetter | ||
ifTrue: [self assert: firstChar isLowercase] | ||
]. |
7 changes: 7 additions & 0 deletions
7
...sts-SVG-Linter.package/SVGLinterTests.class/instance/testMethodNoConsecutiveEmptyLines.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 @@ | ||
tests | ||
testMethodNoConsecutiveEmptyLines | ||
|
||
self methodsLinesDo: [:lines | | ||
1 to: lines size -1 do: [:index | | ||
self assert: ((self isLineWithOnlyTabsAndSpaces: (lines at: index)) | ||
and: [self isLineWithOnlyTabsAndSpaces: (lines at: index + 1)]) not]]. |
4 changes: 4 additions & 0 deletions
4
...ages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testMethodNoEmptyLineAtEnd.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,4 @@ | ||
tests | ||
testMethodNoEmptyLineAtEnd | ||
|
||
self methodsLinesDo: [:lines | self assert: (self isLineWithOnlyTabsAndSpaces: lines last) not]. |
5 changes: 5 additions & 0 deletions
5
...Tests-SVG-Linter.package/SVGLinterTests.class/instance/testMethodNoTrailingWhitespaces.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,5 @@ | ||
tests | ||
testMethodNoTrailingWhitespaces | ||
|
||
self methodsLinesDo: [:lines | | ||
lines do: [:aLine | self assert: (self hasTrailingWhitespaces: aLine) not]]. |
5 changes: 5 additions & 0 deletions
5
...Linter.package/SVGLinterTests.class/instance/testMethodNoTwoWhitespacesNextToEachOther.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,5 @@ | ||
tests | ||
testMethodNoTwoWhitespacesNextToEachOther | ||
|
||
self methodsLinesDo: [:lines | | ||
lines do: [:aLine | self assert: (aLine includesSubstring: String space, String space) not]]. |
4 changes: 4 additions & 0 deletions
4
...s-SVG-Linter.package/SVGLinterTests.class/instance/testMethodParamsHaveMeaningfulNames.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,4 @@ | ||
tests | ||
testMethodParamsHaveMeaningfulNames | ||
|
||
self methodsLinesDo: [:lines | self assert: (lines first includesSubstring: 'anObject') not]. |
4 changes: 4 additions & 0 deletions
4
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testNoClassComments.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,4 @@ | ||
tests | ||
testNoClassComments | ||
|
||
self arbitraryCodeRule: #noClassComments: plugIn: SLSwaMetricsPlugIn. |
10 changes: 10 additions & 0 deletions
10
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testNoDotAfterReturn.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,10 @@ | ||
tests | ||
testNoDotAfterReturn | ||
|
||
| code | | ||
|
||
self methodTestObjects do: [:aSLMethodTestObject | | ||
code := aSLMethodTestObject sourceCode string. | ||
|
||
"may return nil, so deny: is not an option" | ||
self assert: (SLCodingStylesPlugIn new hasDotAfterReturn: code) ~= true]. |
5 changes: 5 additions & 0 deletions
5
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testNoUnclassifiedMethods.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,5 @@ | ||
tests | ||
testNoUnclassifiedMethods | ||
|
||
"all methods have to be classified" | ||
self arbitraryCodeRule: #smallLintUnclassifiedMethods. |
5 changes: 5 additions & 0 deletions
5
...es/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testNoUnconditionalRecursion.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,5 @@ | ||
tests | ||
testNoUnconditionalRecursion | ||
|
||
"Infinite recursion is forbidden" | ||
self arbitraryCodeRule: #smallLintUnconditionalRecursion. |
5 changes: 5 additions & 0 deletions
5
packages/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testSmallLintContains.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,5 @@ | ||
tests | ||
testSmallLintContains | ||
|
||
"Use contains instead of detect: ifNone:" | ||
self arbitraryCodeRule: #smallLintContains. |
5 changes: 5 additions & 0 deletions
5
...s-SVG-Linter.package/SVGLinterTests.class/instance/testTemporaryVariableCapitalization.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,5 @@ | ||
tests | ||
testTemporaryVariableCapitalization | ||
|
||
"temporary variables should start with lowercase letters" | ||
self arbitraryCodeRule: #smallLintTemporaryVariableCapitalization. |
5 changes: 5 additions & 0 deletions
5
...-Linter.package/SVGLinterTests.class/instance/testsmallLintClassVariableCapitalization.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,5 @@ | ||
tests | ||
testsmallLintClassVariableCapitalization | ||
|
||
"Class vars are pascalcase" | ||
self arbitraryCodeRule: #smallLintClassVariableCapitalization. |
5 changes: 5 additions & 0 deletions
5
...s-SVG-Linter.package/SVGLinterTests.class/instance/testsmallLintCodeCruftLeftInMethods.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,5 @@ | ||
tests | ||
testsmallLintCodeCruftLeftInMethods | ||
|
||
"remove debugger breaks etc from code, otherwise this test fails" | ||
self arbitraryCodeRule: #smallLintCodeCruftLeftInMethods. |
5 changes: 5 additions & 0 deletions
5
...sts-SVG-Linter.package/SVGLinterTests.class/instance/testsmallLintCollectSelectNotUsed.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,5 @@ | ||
tests | ||
testsmallLintCollectSelectNotUsed | ||
|
||
"prefer collect and select to manual list manipulation and aggregation" | ||
self arbitraryCodeRule: #smallLintCollectSelectNotUsed. |
5 changes: 5 additions & 0 deletions
5
...s/Tests-SVG-Linter.package/SVGLinterTests.class/instance/testsmallLintConsistencyCheck.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,5 @@ | ||
tests | ||
testsmallLintConsistencyCheck | ||
|
||
"isEmpty, isNil and First should be preferred to size = 0, = nil, at: 1" | ||
self arbitraryCodeRule: #smallLintConsistencyCheck. |
5 changes: 5 additions & 0 deletions
5
...ests-SVG-Linter.package/SVGLinterTests.class/instance/testsmallLintDefinesEqualNotHash.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,5 @@ | ||
tests | ||
testsmallLintDefinesEqualNotHash | ||
|
||
"Menu items should be translated somehow. will be evergreen until we sell this as a feature" | ||
self arbitraryCodeRule: #smallLintDefinesEqualNotHash. |
Oops, something went wrong.