Skip to content
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

More OD pragmas: Pointless positional argument, ambiguous in order, and proc argument global #7482

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

Drulikar
Copy link
Contributor

@Drulikar Drulikar commented Nov 3, 2024

About the pull request

This PR adds more open dream pragmas to lint for logic errors:

  • PointlessPositionalArgument: A new pragma has been added for detecting pointless positional arguments in procs, not lists
  • AmbiguousInOrder: A new pragma has been added for detecting ambiguous uses of in with unexpected behavior, similar to the lint in SpacemanDMM/DreamChecker. An example is "a" in a || "b" in b being parsed as ("a" in (a || "b")) in b.
  • ProcArgumentGlobal: A new pragma has been added for detecting this BYOND bug: https://www.byond.com/forum/post/2830750
    When a proc argument begins with /var/ instead of var/, it creates a global variable instead of an argument.

Explain why it's good for the game

More robust code.

Testing Photographs and Procedure

Screenshots & Videos

Put screenshots and videos here with an empty line between the screenshots and the <details> tags.

Changelog

🆑 Drathek
code: Enabled 3 more OD pragmas for linting and fixed some ambiguous usage of In
/:cl:

@cmss13-ci cmss13-ci bot added the Code Improvement Make the code longer label Nov 3, 2024
@Drulikar Drulikar marked this pull request as ready for review November 3, 2024 06:08
@harryob harryob added this pull request to the merge queue Nov 4, 2024
Merged via the queue into cmss13-devs:master with commit 80d0dbf Nov 4, 2024
29 checks passed
cmss13-ci bot added a commit that referenced this pull request Nov 4, 2024
@Drulikar Drulikar deleted the More_Pragmas branch November 4, 2024 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Make the code longer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants