Skip to content

Add a "strict" mode #1191

Open
Open

Description

@fingolfin

Let's add a strict mode (like e.g. perl has) which warns resp. errors on extra things:

This mode could be enabled or disabled via a command line switch.

Activity

  1. added
    kind: enhancementLabel for issues suggesting enhancements; and for pull requests implementing enhancements
    on Mar 16, 2017
  2. fingolfin commented on Jul 14, 2017

    @fingolfin
    MemberAuthor

    So to elaborate a bit, here is what I'd do:

    • add a global boolean flag to the kernel, say StrictMode, which defaults to 0 / false.
    • add a command line option --strict which changes the default to 1 / true (can be added in src/system.c next to the other command line options)
    • then look at the code in the two pull requests referenced above; try to adapt their patches so that their warnings are only printed if StrictMode is 1 / true.
    • think about other things it could do, and/or ask about
    • also consider exposing the state of the mode to the GAP language level somehow (say by setting a global variable)
  3. fingolfin commented on Dec 20, 2024

    @fingolfin
    MemberAuthor

    I also have code that prints a warning when a function contains an unused local.

  4. wilfwilson commented on Aug 27, 2025

    @wilfwilson
    Member

    This sounds nice.

  5. removed
    good first issueIssues that can be understood and addressed by newcomers to GAP development
    on Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gapdays2017-springIssues and PRs that arose at https://www.gapdays.de/gapdays2017-springkind: enhancementLabel for issues suggesting enhancements; and for pull requests implementing enhancementstopic: kernel

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions