summaryrefslogtreecommitdiffstats
path: root/test (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-01-24Fix output and note which test cases are used to test each warningMattias Andrée3-3/+26
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-24Add more test casesMattias Andrée4-0/+11
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-18test: print symbol names to exit codesMattias Andrée1-2/+13
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-18-m test: fail if there is an error during execution or at end if there one or more of the tests failedMattias Andrée1-0/+4
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-18test: add missing quotes, allow : in extra options, use printf instead of echo, print to stderr and not stdout, and some style changesMattias Andrée1-15/+19
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-18Do not run check by defaultMattias Andrée1-1/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-18Implemented a simple test suiteThomas Oltmann7-2/+44
The test suite simply runs makel in turn on all Makefiles in tests/, and compares makel's exit codes with the expected exit codes that are written in the Makefiles themselves. This system could be improved by comparing warning classes instead, and using text identifiers instead of numerical codes which might be subject to change. Revision 2 of this patch: Make target to run the test suite is now called 'check' to avoid confusion.
2022-01-07Fixed line continuation checks.Thomas Oltmann2-3/+4
The checks for line continuation starting on an empty line, ending on an empty line, and ending on EOF were broken because of logic errors in said checks, as well as an accidental negation in is_line_blank().
2022-01-05Use c99 instead of nonportable cc -std=c99Mattias Andrée1-2/+2
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-04Add todos for commentsMattias Andrée1-1/+10
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-04Remove unused files from .gitignore and make cleanMattias Andrée2-7/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-04Replace dependency on libsimple with boilerplate codeMattias Andrée6-7/+133
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-04Rename to makelMattias Andrée3-10/+10
Suggested by Laslo Hunhold, "Makel" is German for defect, deficiency, impurity, or imperfection (both singular and plural); a flaw. This change is to avoid confusion between make(1) and mk(1) Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-04don't print argv0NRK1-2/+2
imo a good linter should be concise and helpful. printing argv0 doesn't add much value but instead adds noise to the output. i've left printerrorf untouched however, since it calls exit.
2022-01-04miscMattias Andrée3-8/+64
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-02Remove unnecessary bracketsMattias Andrée1-2/+2
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-01Lint line continuation and whitespace issuesMattias Andrée4-9/+220
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-01Move some functions into makefile.cMattias Andrée4-87/+96
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-01Fix replacement character insertion for invalid UTF-8Mattias Andrée1-1/+2
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-01Validate UTF-8 encoding and check for long linesMattias Andrée7-97/+199
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-01Change [warn] to [warning]Mattias Andrée1-1/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>
2022-01-01improve WC_EXTRA_MAKEFILE warningNRK1-3/+4
currently if open_default_makefile() finds a standard makefile it will print info message but then warn about the same file being "additional." [nrk mklint master]% ./mklint ./mklint: [info] found standard makefile to use: Makefile (-wmakefile) ./mklint: [warn] found additional standard makefile: Makefile (-wextra-makefile) this makes it so that it doesn't produce warning about the the makefile that it already found as "additional." also declares the default_makefiles pointer as const for good measures.
2022-01-01Rename to mklint to avoid confusion with pre-existing tool with opposite goalMattias Andrée3-10/+10
Signed-off-by: Mattias Andrée <maandree@kth.se>
2021-12-31mMattias Andrée1-1/+1
Signed-off-by: Mattias Andrée <maandree@kth.se>