#!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 ## Pocket lang root directory. All the listed paths bellow are relative to ## the root path. ROOT_PATH = abspath(join(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://', '