Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4768ca9
test: add test cases for footer-empty
marionebl May 1, 2017
5f9a618
fix: finish footer-empty implementation
marionebl May 1, 2017
cffc077
test: add test cases for footer-max-length
marionebl May 1, 2017
06fb33b
fix: allow empty footer for footer-max-length
marionebl May 1, 2017
380705b
test: correct non-criticals in footer-max-length tests
marionebl May 1, 2017
bd1e874
test: add test cases for footer-min-length
marionebl May 1, 2017
5d0b4e0
fix: allow empty footer for footer-min-length
marionebl May 1, 2017
419af1f
test: add cases for body-empty
marionebl May 1, 2017
ada66d0
fix: use keywords in body-empty
marionebl May 1, 2017
76efafa
test: add cases for subject-empty
marionebl May 1, 2017
89b9cb0
fix: use keywords in subject-empty
marionebl May 1, 2017
6194f4a
test: add cases for type-empty
marionebl May 1, 2017
4bebfc7
test: remove superfluous message prefixes
marionebl May 1, 2017
70e42f5
fix: use keywords in type-empty
marionebl May 1, 2017
d304cbf
style: move tests into colocation
marionebl May 1, 2017
6c338e0
test: add body-case test cases
marionebl May 4, 2017
65fc90a
fix: handle empty body gracefully
marionebl May 4, 2017
6b725ac
fix: rework ensure-case to produce saner output
marionebl May 4, 2017
1fdbdae
test: add cases for body-leading-blank
marionebl May 4, 2017
e314d5b
test: add multiline body cases for footer-leading-blank
marionebl May 4, 2017
ea74188
fix: handle multiline bodies properly
marionebl May 4, 2017
25c43f8
fix: harden body-leading-blank implementation
marionebl May 4, 2017
7dfc3a2
test: add body-max-length cases
marionebl May 4, 2017
5e7f0ef
fix: handle empty body gracefully
marionebl May 4, 2017
239b7a0
test: add body-min-length cases
marionebl May 4, 2017
d74210d
fix: handle empty body gracefully
marionebl May 4, 2017
6269cf3
fix: add test case for footer-tense
marionebl May 4, 2017
6113353
feat: introduce object based config for footer-tense
marionebl May 4, 2017
010aabf
test: add header length tests
marionebl May 4, 2017
6ca5e80
test: add case rule tests
marionebl May 4, 2017
bb3fe0d
fix: handle empty scope
marionebl May 4, 2017
0871f45
fix: handle empty subject
marionebl May 4, 2017
6ef3dc7
style: harmonize case rules
marionebl May 4, 2017
98e53f3
fix: handle empty type
marionebl May 4, 2017
b46c481
test: harmonize length tests
marionebl May 4, 2017
0cd5f50
test: add length tests
marionebl May 4, 2017
47dc14e
chore: be specific about ava test files
marionebl May 4, 2017
42a5545
fix: implement length checks correctly
marionebl May 4, 2017
5dabf9d
chore: update dev dependencies
marionebl May 6, 2017
05fcd76
test: add subject-full-stop cases
marionebl May 6, 2017
66cc1c5
fix: harden subject-full-stop implementation
marionebl May 6, 2017
c3e48c3
test: add case for subject-leading-capital
marionebl May 6, 2017
5e69f94
fix: harden subject-leading-capital
marionebl May 6, 2017
23ace19
test: add body-tense case
marionebl May 6, 2017
cc90734
fix: harden body-tense rule
marionebl May 6, 2017
79f6c0a
fix: harden subject-tense
marionebl May 6, 2017
11f4126
test: add export case
marionebl May 6, 2017
a0f948c
test: add case for lang
marionebl May 7, 2017
55505b9
chore: harden lang implementation
marionebl May 7, 2017
7549a74
chore: add missing devDependency
marionebl May 7, 2017
54ff336
chore: add nyc coverage
marionebl May 7, 2017
0b1ad3f
test: add case for type-enum
marionebl May 7, 2017
765f9df
fix: harden type-enum
marionebl May 7, 2017
b594061
test: add case for ensure-case
marionebl May 7, 2017
e681119
chore: bring linting up to speed
marionebl May 7, 2017
aec063a
style: be consistent with xo
marionebl May 7, 2017
1dbe6d9
test: add case for ensure-enum
marionebl May 8, 2017
85717e1
fix: harden ensure-enum
marionebl May 8, 2017
12db90e
test: add case for ensure-language
marionebl May 8, 2017
8107fc8
test: add case for ensure-max-length
marionebl May 8, 2017
3dde66c
test: add case for ensure-min-length
marionebl May 8, 2017
8b7c0c9
test: add case for ensure-not-empty
marionebl May 8, 2017
730b846
test: add case for ensure-tense
marionebl May 9, 2017
77fb57c
fix: harden ensure tense against type errors
marionebl Jul 6, 2017
aea421b
chore: fix babel build on win32 platforms
marionebl Jul 6, 2017
da2b6db
test: add test cases for execute-rule
marionebl Jul 6, 2017
2762921
fix: handle noop calls gracefully
marionebl Jul 6, 2017
e0719d9
test: add test cases for get-preset
marionebl Jul 6, 2017
a9dd020
test: add test cases for format
marionebl Jul 6, 2017
b3f2ca5
fix: more solid formatter implementation
marionebl Jul 6, 2017
0c6e275
test: add shell tests for parse method
marionebl Jul 6, 2017
b80fcf6
fix: solidify and test resolve-extends
marionebl Jul 7, 2017
2695c4e
test: execute color format test only if supported
marionebl Jul 7, 2017
7fb4b3a
fix: harmonize dynamic importers
marionebl Jul 7, 2017
7d04993
chore: cleanup
marionebl Jul 7, 2017
f4c9368
chore: do not babel test files
marionebl Jul 7, 2017
8136c14
chore: ignore *.test only for prod builds
marionebl Jul 7, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: handle empty body gracefully
  • Loading branch information
marionebl committed May 4, 2017
commit d74210ddf7e41bbef518c81c0842f53b1f09f893
4 changes: 4 additions & 0 deletions source/rules/body-min-length.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import ensureMinLength from '../library/ensure-min-length';

export default (parsed, when, value) => {
if (!parsed.body) {
return [true];
}

return [
ensureMinLength(parsed.body, value),
`body must not be shorter than ${value} characters`
Expand Down
2 changes: 1 addition & 1 deletion source/rules/body-min-length.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const parsed = {
long: parse(messages.long)
};

test.failing('with simple message should succeed', t => {
test('with simple message should succeed', t => {
const [actual] = bodyMinLength(parsed.simple, '', needed);
const expected = true;
t.is(actual, expected);
Expand Down