carp checkers: add carp checker and make it work
This commit is contained in:
9
Pond.package/CarpChecker.class/instance/check.st
Normal file
9
Pond.package/CarpChecker.class/instance/check.st
Normal file
@@ -0,0 +1,9 @@
|
||||
checking
|
||||
check
|
||||
| f |
|
||||
f := FileReference newTempFilePrefix: 'checker' suffix: '.carp'.
|
||||
f writeStreamDo: [:stream | stream nextPutAll: file].
|
||||
proc arguments: {'--check' . f pathString }.
|
||||
self run.
|
||||
excepted ifNotNil: [ CarpError new messageText: excepted messageText ].
|
||||
self died ifFalse: [ ^ CarpCheckParser new parse: proc stdoutStream ]
|
3
Pond.package/CarpChecker.class/instance/file..st
Normal file
3
Pond.package/CarpChecker.class/instance/file..st
Normal file
@@ -0,0 +1,3 @@
|
||||
checking
|
||||
file: aString
|
||||
file := aString
|
3
Pond.package/CarpChecker.class/instance/file.st
Normal file
3
Pond.package/CarpChecker.class/instance/file.st
Normal file
@@ -0,0 +1,3 @@
|
||||
checking
|
||||
file
|
||||
^ file
|
5
Pond.package/CarpChecker.class/instance/initialize.st
Normal file
5
Pond.package/CarpChecker.class/instance/initialize.st
Normal file
@@ -0,0 +1,5 @@
|
||||
checking
|
||||
initialize
|
||||
proc := OSSUnixSubprocess new command: 'carp';
|
||||
redirectStdout;
|
||||
addAllEnvVariablesFromParentWithoutOverride
|
4
Pond.package/CarpChecker.class/instance/run.st
Normal file
4
Pond.package/CarpChecker.class/instance/run.st
Normal file
@@ -0,0 +1,4 @@
|
||||
checking
|
||||
run
|
||||
[ [ proc run ] on: Error do: [ :err | excepted := err ] ] fork.
|
||||
(Delay forMilliseconds: 500) wait.
|
Reference in New Issue
Block a user