Skip to content

Commit

Permalink
Fix: tickled files for modularity (#11)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## What Does This PR Do
<!-- Include a small to medium description of what your PR changes. -->
<!-- Document all changes, as not doing this may delay reviews or even
discourage maintainers from merging your PR! -->
<!-- If your PR fixes an issue, add "Fixes #1234" somewhere in the PR
description. This will automatically close the bug upon PR submission.
-->

## Why It's Good For The Game
<!-- Add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Images of changes
<!-- If you did not make a map or sprite edit, you may delete this
section. You may include a gif or mp4 of your feature if you want. -->

## Testing
<!-- How did you test the PR, if at all? -->

## Changelog
:cl:
fix: Теперь учитываются вложенные инклюды для юнит тестов
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
<!-- If a PR has no impact on players (i.e. a code refactor that does
not change functionality) then the entire Changelog heading and contents
can be removed. -->
  • Loading branch information
Furrior committed Jul 14, 2023
1 parent 682d9c1 commit fb9d8e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2673,5 +2673,7 @@
#include "goon\code\datums\browserOutput.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "modular_ss220\modular_ss220.dme" // SS220
// END_INCLUDE

// SS220
#include "modular_ss220\modular_ss220.dme"
10 changes: 8 additions & 2 deletions tools/ci/unticked_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@

IGNORE_FILES = {
# Included directly in the function /datum/tgs_api/v5#ApiVersion
'code/modules/tgs/v5/v5_interop_version.dm'
'code/modules/tgs/v5/v5_interop_version.dm',
# Example files. They should not be included in the build
'modular_ss220/example/code/example.dm',
'modular_ss220/example/_example.dm'
}

def get_unticked_files(root:Path):
Expand All @@ -35,8 +38,11 @@ def get_unticked_files(root:Path):
with open(root / includer, 'r') as f:
lines = [line for line in f.readlines() if line.startswith('#include')]
included = [line.replace('#include ', '').rstrip('\r\n').strip('"') for line in lines]
print(f'Found {len(included)} includes in {root / includer}')
nested_dmes = [file for file in included if ".dme" in file]
print(f'Found {len(included)} includes and {len(nested_dmes)} nested .dme\'s in {root / includer}')
ticked_files.update([root / Path(includer).parent / Path(PureWindowsPath(i)) for i in included])
if nested_dmes: print(f"Additional include files: {nested_dmes}")
INCLUDER_FILES.extend([file.replace("\\", "/") for file in nested_dmes])

all_dm_files = {f for f in root.glob('**/*.dm')}
return all_dm_files - ticked_files - {root / f for f in IGNORE_FILES}
Expand Down

0 comments on commit fb9d8e1

Please sign in to comment.