File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999
100100# mypy
101101.mypy_cache /
102+ .idea /
Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ import subprocess
4+
5+ def check_author_file (project_path : str ):
6+ # @todo: Add a skip if author file set as optional
7+ author_fr = project_path + "/auteur"
8+ author_us = project_path + "/author"
9+ if os .path .exists (author_fr ):
10+ output = subprocess .check_output ("awk 'END {printf NR}' " + author_fr , shell = True )
11+ elif os .path .exists (author_us ):
12+ output = subprocess .check_output ("awk 'END {printf NR}' " + author_us , shell = True )
13+ else :
14+ print ("Author file not found" )
15+ sys .exit () # @todo Add message if author file is set as optional
16+ if output != 1 :
17+ print ("Too many lines in author file (Or the file is empty)" )
18+ sys .exit () # @todo Add message if author file is set as optional or if project isn't solo
19+
20+ check_author_file ("C:/Users/Jules/PycharmProjects/42PyChecker" )
Original file line number Diff line number Diff line change 186186 same "printed page" as the copyright notice for easier
187187 identification within third-party archives.
188188
189- Copyright [yyyy] [name of copyright owner]
189+ Copyright 2018-present Jules Lasne
190190
191191 Licensed under the Apache License, Version 2.0 (the "License");
192192 you may not use this file except in compliance with the License.
You can’t perform that action at this time.
0 commit comments