Skip to content

Commit

Permalink
updated documentation in header and for new functions - updated funct…
Browse files Browse the repository at this point in the history
…ion name to be more accurate
  • Loading branch information
johncoleman83 committed Aug 12, 2017
1 parent 4658418 commit 7663986
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ Multiple files:
./w3c_validator.py index.html header.html styles/common.css
```

All errors are printed in `STDERR`
All errors are printed in `STDERR`; Exit status = # of errors (0 on success)


## References

https://developer.mozilla.org/en-US/

8 changes: 6 additions & 2 deletions w3c_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
All errors are printed in `STDERR`
Return:
Exit status is the # of errors, 0 on Success
References
Expand Down Expand Up @@ -99,7 +101,9 @@ def __analyse(file_path):
return nb_errors


def __main_app():
def __files_loop():
"""Loop that analyses for each file from input arguments
"""
nb_errors = 0
for file_path in sys.argv[1:]:
nb_errors += __analyse(file_path)
Expand All @@ -116,4 +120,4 @@ def __main_app():

"""execute tests, then exit. Exit status = # of errors (0 on success)
"""
sys.exit(__main_app())
sys.exit(__files_loop())

0 comments on commit 7663986

Please sign in to comment.