Example #1
0
#    along with DChars.  If not, see <http://www.gnu.org/licenses/>.
################################################################################
"""
        ❏DChars❏ pylint_tests.py
"""

import os
import re
from projects_files import get_all_filenames
from console import CONSOLE

CONSOLE.use_the_color("cyan")
CONSOLE.writeln("="*80)
CONSOLE.writeln("TEST : pylint_test.py")
CONSOLE.writeln("="*80)
CONSOLE.use_the_default_color()

COMMANDSTRING = "pylint --rcfile=pylint.rc {0} > z"

NBR_FILES = 0
WORST_MARK = 10

with open("pylint.output","w") as dest:

    for filename in get_all_filenames(only_py_files=True):

        if not os.path.exists(filename):
            raise Exception("Unknown file : "+str(filename))

        dest.write("="*80 + "\n")
        dest.write(filename + "\n")