Skip to content

Commit b5ddcec

Browse files
committed
Starting to connect the checkers.
1 parent f0aab98 commit b5ddcec

File tree

3 files changed

+66
-7
lines changed

3 files changed

+66
-7
lines changed

src/Pillar-Chrysal/ConfigurationForPillar.class.st

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ ConfigurationForPillar >> bibFile: aValue [
163163
^ self propertyAt: #bibFile put: aValue
164164
]
165165

166+
{ #category : 'manually added for now' }
167+
ConfigurationForPillar >> checkerConfigurations [
168+
^ self propertyAt: #checkerConfigurations ifAbsent: [ #()]
169+
]
170+
171+
{ #category : 'manually added for now' }
172+
ConfigurationForPillar >> checkerConfigurations: aCol [
173+
174+
^ self propertyAt: #checkerConfigurations put: aCol
175+
]
176+
166177
{ #category : 'conversion' }
167178
ConfigurationForPillar >> convertAttribution: aValue [
168179
"generated code"
@@ -402,6 +413,17 @@ ConfigurationForPillar >> htmlWriter: aValue [
402413
^ self propertyAt: #htmlWriter put: aValue
403414
]
404415

416+
{ #category : 'manually added for now' }
417+
ConfigurationForPillar >> ignoredCheckers [
418+
^ self propertyAt: #ignoredCheckers ifAbsent: [ #()]
419+
]
420+
421+
{ #category : 'manually added for now' }
422+
ConfigurationForPillar >> ignoredCheckers: aCol [
423+
424+
^ self propertyAt: #ignoredCheckers put: aCol
425+
]
426+
405427
{ #category : 'accessing' }
406428
ConfigurationForPillar >> inputFile [
407429
"generated code"

src/Pillar-Chrysal/ConfigurationForPillarTest.class.st

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,51 @@ ConfigurationForPillarTest >> configurationDictionary [
4141

4242
]
4343

44+
{ #category : 'helpers' }
45+
ConfigurationForPillarTest >> configurationDictionaryWithIgnored [
46+
47+
^ STONJSON fromString: '{
48+
"language" : "en-UK",
49+
"base_url" : "",
50+
"attribution" : "Stéphane Ducasse and Guillermo Polito",
51+
"keywords" : "Interpreters, languages, Pharo, Smalltalk",
52+
"title" : "Fun with Interpreters in Pharo",
53+
"series" : "The Pharo Booklet Collection — edited by S. Ducasse",
54+
"htmlWriter" : "html",
55+
"latexWriter" : "miclatex:sbabook",
56+
"bibFile" : "others.bib",
57+
"ignoredCheckers" : [ "FrenchTypography" ],
58+
"checkerConfigurations" :
59+
[
60+
"Vocabulary" :
61+
[
62+
[
63+
"sub-presenter",
64+
"subpresenter"
65+
],
66+
[
67+
"sub presenter",
68+
"subpresenter"
69+
],
70+
[
71+
"meta object",
72+
"metaobject"
73+
]
74+
]
75+
]
76+
}'
77+
78+
]
79+
4480
{ #category : 'tests' }
4581
ConfigurationForPillarTest >> testCheckers [
4682

4783
| configuration |
4884

49-
configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionary.
85+
configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionaryWithIgnored.
5086
self
51-
assert: (configuration at: 'checkers')
52-
equals: #('Vocabulary' 'EnglishTypography')
87+
assert: (configuration at: 'ignoredCheckers')
88+
equals: #('FrenchTypography')
5389

5490

5591

@@ -62,10 +98,10 @@ ConfigurationForPillarTest >> testCheckersConfiguration [
6298

6399
| configuration |
64100

65-
configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionary.
101+
configuration := ConfigurationForPillar newFromSTONDictionary: self configurationDictionaryWithIgnored.
66102
self
67103
assert: (configuration at: 'checkerConfigurations')
68-
equals: {'Vocabulary'->#(#('sub-presenter' 'subpresenter') #('sub presenter' 'subpresenter') #('meta object' 'metaobject'))}
104+
equals: {'Vocabulary' -> #(#('sub-presenter' 'subpresenter') #('sub presenter' 'subpresenter') #('meta object' 'metaobject'))}
69105

70106

71107
]

src/Pillar-Cli-BookTester/ClapPillarBookTesterCommand.class.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ ClapPillarBookTesterCommand >> execute [
3030
file exists
3131
ifTrue: [
3232
| reporter parent |
33-
self halt.
3433
parent := self project baseDirectory.
3534
reporter := MicAnalysisReportWriter
36-
reportForFolder: parent startingFrom: file.
35+
reportForFolder: parent
36+
startingFrom: file
37+
configuration: self project configuration.
3738

3839
reporter isOkay
3940
ifTrue: [

0 commit comments

Comments
 (0)