Skip to content

Linting for set SpacemanDMM_ statements that have no effect#435

Merged
SpaceManiac merged 3 commits intoSpaceManiac:masterfrom
Drulikar:lint_setting
Jun 23, 2025
Merged

Linting for set SpacemanDMM_ statements that have no effect#435
SpaceManiac merged 3 commits intoSpaceManiac:masterfrom
Drulikar:lint_setting

Conversation

@Drulikar
Copy link
Copy Markdown
Contributor

@Drulikar Drulikar commented Jun 20, 2025

Currently when a spaceman setting like SHOULD_CALL_PARENT comes after some other statement other than possibly another setting, it is silently ignored. This PR now errors in that situation. The checking is only performed on spaceman settings and not built in settings (e.g. background) because those can situationally be allowed in control statements so long as they otherwise would be at the top of the proc, but dreammaker will already warn for them if they would have no effect.

See below where red lined are the new lints, and yellow lined are the existing dreammaker warnings.
image

@Drulikar Drulikar changed the title Linting for set SpacemanDMM_ statments that have no effect Linting for set SpacemanDMM_ statements that have no effect Jun 20, 2025
@SpaceManiac SpaceManiac merged commit 7f26414 into SpaceManiac:master Jun 23, 2025
1 check passed
@Drulikar Drulikar deleted the lint_setting branch June 24, 2025 21:36
github-merge-queue bot pushed a commit to cmss13-devs/cmss13 that referenced this pull request Jun 26, 2025
# About the pull request

This PR (in addition to #9762) fixes a few places where Spacemandmm
directives like `SHOULD_CALL_PARENT` were doing nothing but also not
emitting any warning. With
SpaceManiac/SpacemanDMM#435 they will now be
errors.

# Explain why it's good for the game

Code should not merely be no-ops.

# Changelog

No player facing changes.
san7890 pushed a commit to tgstation/tgstation that referenced this pull request Jun 27, 2025
## About The Pull Request

SpaceManiac/SpacemanDMM#435 added a new
dreamchecker lint, for SDMM `set` statements not at the top of the proc.

While this lint isn't in the current SDMM _release_, I was testing it
out earlier and saw these issues, so might as well fix them before they
even become an issue.

i also fixed a useless variable in moon heretic code that was right next
to the incorrectly placed `SIGNAL_HANDLER`

## Why It's Good For The Game


https://github.com/user-attachments/assets/5b063f41-32f3-490a-b0a3-199ca8147ec3

## Changelog

No player-facing changes.
TealSeer pushed a commit to Bubberstation/Bubberstation that referenced this pull request Jun 29, 2025
## About The Pull Request

SpaceManiac/SpacemanDMM#435 added a new
dreamchecker lint, for SDMM `set` statements not at the top of the proc.

While this lint isn't in the current SDMM _release_, I was testing it
out earlier and saw these issues, so might as well fix them before they
even become an issue.

i also fixed a useless variable in moon heretic code that was right next
to the incorrectly placed `SIGNAL_HANDLER`

## Why It's Good For The Game

https://github.com/user-attachments/assets/5b063f41-32f3-490a-b0a3-199ca8147ec3

## Changelog

No player-facing changes.

(cherry picked from commit a2a43e2)
Iajret pushed a commit to Iajret/LizardsPurgatory that referenced this pull request Aug 1, 2025
## About The Pull Request

SpaceManiac/SpacemanDMM#435 added a new
dreamchecker lint, for SDMM `set` statements not at the top of the proc.

While this lint isn't in the current SDMM _release_, I was testing it
out earlier and saw these issues, so might as well fix them before they
even become an issue.

i also fixed a useless variable in moon heretic code that was right next
to the incorrectly placed `SIGNAL_HANDLER`

## Why It's Good For The Game


https://github.com/user-attachments/assets/5b063f41-32f3-490a-b0a3-199ca8147ec3

## Changelog

No player-facing changes.
TealSeer pushed a commit to effigy-se/effigy that referenced this pull request Aug 3, 2025
## About The Pull Request

SpaceManiac/SpacemanDMM#435 added a new
dreamchecker lint, for SDMM `set` statements not at the top of the proc.

While this lint isn't in the current SDMM _release_, I was testing it
out earlier and saw these issues, so might as well fix them before they
even become an issue.

i also fixed a useless variable in moon heretic code that was right next
to the incorrectly placed `SIGNAL_HANDLER`

## Why It's Good For The Game


https://github.com/user-attachments/assets/5b063f41-32f3-490a-b0a3-199ca8147ec3

## Changelog

No player-facing changes.
Floofies pushed a commit to Floofies/NovaSector that referenced this pull request Aug 5, 2025
## About The Pull Request

SpaceManiac/SpacemanDMM#435 added a new
dreamchecker lint, for SDMM `set` statements not at the top of the proc.

While this lint isn't in the current SDMM _release_, I was testing it
out earlier and saw these issues, so might as well fix them before they
even become an issue.

i also fixed a useless variable in moon heretic code that was right next
to the incorrectly placed `SIGNAL_HANDLER`

## Why It's Good For The Game


https://github.com/user-attachments/assets/5b063f41-32f3-490a-b0a3-199ca8147ec3

## Changelog

No player-facing changes.
Kocma-san pushed a commit to Fluffy-Frontier/FluffySTG that referenced this pull request Aug 13, 2025
## About The Pull Request

SpaceManiac/SpacemanDMM#435 added a new
dreamchecker lint, for SDMM `set` statements not at the top of the proc.

While this lint isn't in the current SDMM _release_, I was testing it
out earlier and saw these issues, so might as well fix them before they
even become an issue.

i also fixed a useless variable in moon heretic code that was right next
to the incorrectly placed `SIGNAL_HANDLER`

## Why It's Good For The Game


https://github.com/user-attachments/assets/5b063f41-32f3-490a-b0a3-199ca8147ec3

## Changelog

No player-facing changes.
@SpaceManiac SpaceManiac added this to the suite v1.11 milestone Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants