Skip to content

Commit 0797d33

Browse files
authored
don't use linelen for scoring points; just give comments (#6)
1 parent 8b49237 commit 0797d33

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/graders/style.arr

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,11 @@ fun score-style(
162162
| left(err) =>
163163
right({0; parser-error(err)})
164164
| 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)
165+
point-violations = check-fun-names(prog) +
166+
check-binds(prog) +
167+
check-tl-fun-spacing(prog)
168+
info = style-info(base-filename, check-line-length(FS.read-file-string(path)) + point-violations)
169+
num = L.length(point-violations)
171170
score = 1 - if num > 10: 0 else: 0.1 * num end
172171
right({score; info})
173172
end

0 commit comments

Comments
 (0)