Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Euclécio Josias Rodrigues authored and Euclécio Josias Rodrigues committed Sep 30, 2020
1 parent b845ea7 commit dceb1b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Flake8 Linter Action

This action run Flake8 over a project and comment on PR the errors found.
This action runs Flake8 over a project and comment on PR the errors found.

### Install dependencies

Expand Down Expand Up @@ -57,8 +57,6 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{ github.event.number }}


```
## Inputs
Expand All @@ -73,11 +71,11 @@ The GitHub token to use for making API requests.

**Required**

Pull Request number that trigger build.
Pull Request number triggered the build.

## Configure rules and analysis via `setup.cfg`

In order to configure the ESLint analysis for your project, you must create or modify the `setup.cfg` file at the root of your project.
In order to configure the Flake8 analysis for your project, you must create or modify the `setup.cfg` file at the root of your project.

Here follows an example for `setup.cfg`:

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Flake8 Style Evaluator'
description: 'Run Flake8 over a project and comment on the student PR the errors found.'
description: 'Runs Flake8 over a project and comment on the student PR the errors found.'
inputs:
token:
description: 'The GitHub token to use for making API requests.'
Expand Down
4 changes: 2 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def build_comment(feedback):

msg = 'Foram encontrados {} erros'.format(feedback['count'])
if feedback['count'] == 1:
msg = 'Foi encontrado {} erro'.format(feedback['count'])
msg = 'Foi encontrado 1 erro'
comment = '### {}.\n'.format(msg)

for file in feedback['files']:
Expand All @@ -56,7 +56,7 @@ def comment_on_pr(comment):

if __name__ == "__main__":
if len(sys.argv) < 2:
raise ValueError('You must pass report and requirements files as argument!')
raise ValueError('You must pass report and requirements files as arguments!')

feedback = format_feedback(sys.argv[1])
comment = build_comment(feedback)
Expand Down

0 comments on commit dceb1b7

Please sign in to comment.