Skip to content

Commit 2d33aa2

Browse files
committed
Add Makefile
1 parent a88b2da commit 2d33aa2

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,10 @@ jobs:
2727
run: |
2828
python -m pip install --upgrade pip
2929
pip install -r requirements.txt
30+
pip install flake8 pylint
3031
3132
- name: Lint with flake8
32-
run: |
33-
pip install flake8
34-
# stop the build if there are Python syntax errors or undefined names
35-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# exit-zero treats all errors as warnings
37-
flake8 . --count --exit-zero --max-complexity=10 --statistics
33+
run: make flake8
3834

3935
- name: Lint with pylint
40-
run: |
41-
pip install pylint
42-
pylint --disable=R0205 gitchart.py
36+
run: make pylint

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (C) 2021 Sébastien Helleu <[email protected]>
3+
#
4+
# This file is part of GitChart.
5+
#
6+
# GitChart is free software; you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation; either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# GitChart is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with GitChart. If not, see <https://www.gnu.org/licenses/>.
18+
#
19+
20+
all: check
21+
22+
check: lint
23+
24+
lint: flake8 pylint
25+
26+
flake8:
27+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28+
flake8 . --count --exit-zero --max-complexity=10 --statistics
29+
30+
pylint:
31+
pylint --disable=R0205 gitchart.py

0 commit comments

Comments
 (0)