-
-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace nearly every map grep with a YML file that actually respects structure, and fixes the massive amount of failures that were never caught #2427
Merged
MarkSuckerberg
merged 20 commits into
shiptest-ss13:master
from
MarkSuckerberg:updates-deps-again
Jan 9, 2024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
Map Change
Tile placing is hard. Thank you for your service.
GitHub
Our very own Babylon.
Code change
Watch something violently break.
labels
Oct 25, 2023
…structure, and fixes the massive amount of failures that were never caught (#72372) [Documentation here](https://github.com/Mothblocks/tgstation/blob/maplint/tools/maplint/README.md) We should not be using greps to the capacity that we currently are. If you are not smarter than a parser, then you should not try to beat one. DMM files should NOT be treated as text files that can be parsed with any old Unix tool. They are a structured language. Because of our abuse of greps, check_greps is full of hard to read, hard to maintain checks that do not consistently work, because they all make very specific assumptions about how TGM works, which are provably untrue. This format is mostly straightforward for the lints people write, and easily extensible to the ones people will want to write. :cl: fix: Fixes a bunch of cases of windows not being where they were supposed to be, tables/chairs stacking on each other, and other very small stuff you've never noticed before. /:cl:
The tool added in #72372 is pretty awesome. The output is uhh cryptic though. I had to read the source code to realize the (line 382) or whatever part of the message was the dmm line number and there's stack traces everywhere. I've made it support github action error messages so now you get this beauty if you mess up: ![Example cable error](https://user-images.githubusercontent.com/1185434/214156870-d73ffba0-f79a-43ed-9574-e74cc2ee2057.png) Or, in the run summary: ![image](https://user-images.githubusercontent.com/1185434/214157201-e392a6d6-a8a8-4d8a-ac74-c65ae97438c8.png) Errors parsing the lint yml's will also output github action errors, although the line number will always be 1 since the yaml parser discards line numbers to my knowledge. In the midst of doing this, I made the error type contain the file and line info, and added a bunch of type hints in the midst of trying to understand Mothblock's code. Note that for power users, the default behavior is still colored terminal text; `--github` is added by the CI suite to enable this behavior. Much easier to see where the errors are and what they are (who even knows what a 'pop' is? The tg game code calls them grid models.) Nothing player-facing.
You shouldn't be doing this.
MarkSuckerberg
force-pushed
the
updates-deps-again
branch
from
October 26, 2023 00:02
6e9352f
to
36f8205
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
…ile (#79394) This has happened quite a few times in the past and it'd be a good idea to have a linter catch this common mistake. After digging through the Python code for the mapping linter, it appears the linter wasn't correctly identifying two duplicate objects. I tweaked the code to fix this.
ouuuuuggghhh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code change
Watch something violently break.
GitHub
Our very own Babylon.
Map Change
Tile placing is hard. Thank you for your service.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Port of tgstation/tgstation#72372
From original PR:
Documentation here
We should not be using greps to the capacity that we currently are. If you are not smarter than a parser, then you should not try to beat one. DMM files should NOT be treated as text files that can be parsed with any old Unix tool. They are a structured language. Because of our abuse of greps, check_greps is full of hard to read, hard to maintain checks that do not consistently work, because they all make very specific assumptions about how TGM works, which are provably untrue.
This format is mostly straightforward for the lints people write, and easily extensible to the ones people will want to write.
🆑
fix: Fixes a bunch of cases of windows not being where they were supposed to be, tables/chairs stacking on each other, and other very small stuff you've never noticed before.
/:cl: