#!python ## Copyright (c) 2020-2021 Thakee Nathees ## Copyright (c) 2021-2022 Pocketlang Contributors ## Distributed Under The MIT License ## This will run static checks on the source files, for line length, ## uses of tabs, and trailing white spaces, etc. import os, sys, re from os import listdir from os.path import join, abspath, dirname, relpath, normpath ## The absolute path of this file, when run as a script. ## This file is not intended to be included in other files at the moment. THIS_PATH = abspath(dirname(__file__)) ## A list of source files, to check if the fnv1a hash values match it's ## corresponding cstring in the CASE_ATTRIB(name, hash) macro calls. HASH_CHECK_LIST = [ "../src/pk_core.c", "../src/pk_value.c", ] ## A list of extension to perform static checks, of all the files in the ## SOURCE_DIRS. CHECK_EXTENTIONS = ('.c', '.h', '.py', '.pk', '.js') ## A list of strings, if a line contains it we allow it to be longer than ## 79 characters, It's not "the correct way" but it works. ALLOW_LONG_LINES = ('http://', 'https://', '