summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix output and note which test cases are used to test each warningMattias Andrée2022-01-243-3/+26
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add more test casesMattias Andrée2022-01-244-0/+11
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* test: print symbol names to exit codesMattias Andrée2022-01-181-2/+13
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* -m test: fail if there is an error during execution or at end if there one or more of the tests failedMattias Andrée2022-01-181-0/+4
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* test: add missing quotes, allow : in extra options, use printf instead of echo, print to stderr and not stdout, and some style changesMattias Andrée2022-01-181-15/+19
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Do not run check by defaultMattias Andrée2022-01-181-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Implemented a simple test suiteThomas Oltmann2022-01-187-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.
* Fixed line continuation checks.Thomas Oltmann2022-01-072-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().
* Use c99 instead of nonportable cc -std=c99Mattias Andrée2022-01-051-2/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add todos for commentsMattias Andrée2022-01-041-1/+10
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Remove unused files from .gitignore and make cleanMattias Andrée2022-01-042-7/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Replace dependency on libsimple with boilerplate codeMattias Andrée2022-01-046-7/+133
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Rename to makelMattias Andrée2022-01-043-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>
* don't print argv0NRK2022-01-041-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.
* miscMattias Andrée2022-01-043-8/+64
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Remove unnecessary bracketsMattias Andrée2022-01-021-2/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Lint line continuation and whitespace issuesMattias Andrée2022-01-014-9/+220
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Move some functions into makefile.cMattias Andrée2022-01-014-87/+96
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix replacement character insertion for invalid UTF-8Mattias Andrée2022-01-011-1/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Validate UTF-8 encoding and check for long linesMattias Andrée2022-01-017-97/+199
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Change [warn] to [warning]Mattias Andrée2022-01-011-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* improve WC_EXTRA_MAKEFILE warningNRK2022-01-011-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.
* Rename to mklint to avoid confusion with pre-existing tool with opposite goalMattias Andrée2022-01-013-10/+10
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* mMattias Andrée2021-12-311-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* First commitMattias Andrée2021-12-317-0/+378
Signed-off-by: Mattias Andrée <maandree@kth.se>