Better linter inclusions (#16609)

* change + changelog

* aaaaaa

* wtf
This commit is contained in:
Fluffy
2023-07-05 10:24:32 +00:00
committed by GitHub
parent baeb8f0ab7
commit b2b1f0a215
6 changed files with 58 additions and 5 deletions
+1 -4
View File
@@ -8,11 +8,9 @@
// END_FILE_DIR
// BEGIN_PREFERENCES
#define DEBUG
#ifdef OPENDREAM
#include "code\___odlint.dm"
#endif
// END_PREFERENCES
// BEGIN_INCLUDE
#include "code\__linters.dm"
#include "code\global.dm"
#include "code\hub.dm"
#include "code\names.dm"
@@ -99,7 +97,6 @@
#include "code\__defines\smart_token_bucket.dm"
#include "code\__defines\solar.dm"
#include "code\__defines\space_sectors.dm"
#include "code\__defines\spaceman_dmm.dm"
#include "code\__defines\spatial_gridmap.dm"
#include "code\__defines\species.dm"
#include "code\__defines\species_languages.dm"
+12
View File
@@ -0,0 +1,12 @@
/*
This file is used to include linter settings, as they might be incompatible with each other.
Nothing should ever be included before this file.
*/
//SpacemanDMM suite, always included as its definitions are used downstream directly, and just nulled if SPACEMAN_DMM is not defined
#include "___linters\spaceman_dmm.dm"
//OpenDream, only included if OPENDREAM is defined, as otherwise SpacemanDMM isn't happy about the pragma directives
#ifdef OPENDREAM
#include "___linters\odlint.dm"
#endif
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: FluffyGhost
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- backend: "Reordered the inclusion of the linters (OpenDream / SpacemanDMM) pragmas/defines, to avoid native tools nuking it to have them be defined at the very beginning."
+4 -1
View File
@@ -8,9 +8,12 @@ reading = False
FORBID_INCLUDE = [
'code/__defines/unit_testing.dm',
'code/unit_tests/_template.dm',
'code/___odlint.dm',
'code/modules/multiz/disabled.dm',
#Files included by code\__linters.dm, not to evaluate in this check
'code/___linters/spaceman_dmm.dm',
'code/___linters/odlint.dm',
# Included by tgs/includes.dm
r'code/modules/tgs/**/*.dm',
]