Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,16 @@ jobs:
- uses: actions/checkout@v3
- name: Run make check-valgrind
run: make check-valgrind

make-lint:
runs-on: ubuntu-latest

steps:
- name: Install cppcheck
run: |
sudo apt install cppcheck -y
echo "cppcheck installed"

- uses: actions/checkout@v3
- name: Run make lint
run: make lint
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,13 @@ docs-publish:
tags: $(SOURCES)
ctags -Re -f TAGS src/

wc:
@echo "LINES\tWORDS\tMAX-LINE"
@find src -regextype posix-extended -regex ".*\.(c|h)" \
| xargs wc --lines --words --max-line-length \
| sort -n

lint:
cppcheck $(SRCDIR)

.PHONY: clean docs
4 changes: 2 additions & 2 deletions src/graph/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
struct Graph {
HashTableGen *adj;
bool directed; // true by default
bool weighted;
bool tarjan; // false by default
bool weighted; // false by default
bool tarjan; // false by default
};

Graph* graph_create() {
Expand Down
2 changes: 1 addition & 1 deletion src/list/single/list-gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ ListGen* list_gen_concat(ListGen *l1, ListGen *l2);
*/
void list_gen_println_reverse(ListGen *l);

#endif
#endif