We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b49237 commit 0797d33Copy full SHA for 0797d33
1 file changed
src/graders/style.arr
@@ -162,12 +162,11 @@ fun score-style(
162
| left(err) =>
163
right({0; parser-error(err)})
164
| right(prog) =>
165
- violations = check-line-length(FS.read-file-string(path)) +
166
- check-fun-names(prog) +
167
- check-binds(prog) +
168
- check-tl-fun-spacing(prog)
169
- info = style-info(base-filename, violations)
170
- num = L.length(violations)
+ point-violations = check-fun-names(prog) +
+ check-binds(prog) +
+ check-tl-fun-spacing(prog)
+ info = style-info(base-filename, check-line-length(FS.read-file-string(path)) + point-violations)
+ num = L.length(point-violations)
171
score = 1 - if num > 10: 0 else: 0.1 * num end
172
right({score; info})
173
end
0 commit comments