Skip to content

Commit 0fdfbe7

Browse files
committed
Added a command to get all the checkers
It produces /Users/ducasse/Documents/Pharo/vms/130-x64/Pharo.app/Contents/MacOS/Pharo /Users/ducasse/Documents/Pharo/images/P13-PillarCheckerIntegration2/P13-PillarCheckerIntegration2.image clap checker s The following checkers are available: - CodeBlockValidator - ReferenceChecks - CodeIndentation - EnglishTypography - FrenchTypography - CodeLastPeriod - MethodReferenceUsingHash - NotTheFigureX - HeaderCapitalization - Vocabulary - MethodStructure - ParagraphLabelEndPeriod - CodeLastPeriodInCaption - LastPeriodInCode
1 parent b5ddcec commit 0fdfbe7

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Class {
2+
#name : 'ClapPillarCheckersCommand',
3+
#superclass : 'ClapPillarCommand',
4+
#category : 'Pillar-Cli-BookTester-Command',
5+
#package : 'Pillar-Cli-BookTester',
6+
#tag : 'Command'
7+
}
8+
9+
{ #category : 'accessing' }
10+
ClapPillarCheckersCommand class >> commandName [
11+
^ 'checkers'
12+
]
13+
14+
{ #category : 'accessing' }
15+
ClapPillarCheckersCommand class >> commandSpecification [
16+
<commandline>
17+
18+
^ (ClapCommandSpec id: self commandName asSymbol)
19+
commandClass: self;
20+
description: 'Give the list of all the checkers';
21+
"addPositional: #requestedFile description: 'The main file';"
22+
addHelp;
23+
yourself
24+
]
25+
26+
{ #category : 'execution' }
27+
ClapPillarCheckersCommand >> execute [
28+
29+
self outputStreamDo:
30+
[ :str | str
31+
cr;
32+
nextPutAll: 'The following checkers are available: '; cr .
33+
MicChecker allSubclasses do: [ :each |
34+
str nextPutAll: '- '; nextPutAll: each checkerName; cr ]]
35+
]
36+
37+
{ #category : 'execution' }
38+
ClapPillarCheckersCommand >> relativePathStringOf: aFile [
39+
40+
^ ((FileSystem workingDirectory resolve: aFile) relativeTo: FileSystem workingDirectory) fullName
41+
]
42+
43+
{ #category : 'execution' }
44+
ClapPillarCheckersCommand >> requestedFile [
45+
46+
^ self positional: #requestedFile
47+
]

0 commit comments

Comments
 (0)