Skip to content

PyChecker 'crashes' when there's a FileNotFound error #102

@Seluj78

Description

@Seluj78

Expected Behavior

No such file or directory: '/fillit/Makefile'```
and then exit the program properly
## Actual Behavior

➜ 42PyChecker git:(master) ✗ python ~/PycharmProjects/42PyChecker/42PyChecker.py --project=fillit --path=/fillit
42PyChecker Copyright (C) 2018-present Jules Lasne jules.lasne@gmail.com
This program comes with ABSOLUTELY NO WARRANTY; for details run with --show-w'. This is free software, and you are welcome to redistribute it under certain conditions; run with --show-c' for details.
---------------------------------------------------------------
--------------------------Author file--------------------------
---------------------------------------------------------------
--> Error: Author file not found
---------------------------------------------------------------
----------------------------NORM-------------------------------
---------------------------------------------------------------
-- No source file (.c) or header (.h) to check
---------------------------------------------------------------
----------------------------Makefile---------------------------
---------------------------------------------------------------
--> Error: Makefile not found.
---------------------------------------------------------------
----------------------Forbidden functions:---------------------
---------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jlasne/PycharmProjects/42PyChecker/42PyChecker.py", line 127, in
main()
File "/Users/jlasne/PycharmProjects/42PyChecker/42PyChecker.py", line 121, in main
fillit.check(root_path, args)
File "/Users/jlasne/PycharmProjects/42PyChecker/PyChecker/projects/fillit.py", line 21, in check
forbidden_functions_results = forbidden_functions.check(args.path, authorized_functions, root_path)
File "/Users/jlasne/PycharmProjects/42PyChecker/PyChecker/utils/forbidden_functions.py", line 26, in check
with open(project_path + '/Makefile', 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/fillit/Makefile'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions