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

Can remain support checking if the constant names in a module are sorted? #17

Open
taquangtrung opened this issue Apr 18, 2022 · 0 comments

Comments

@taquangtrung
Copy link

Hi,

First of all, thank you for this nice package. I have just discovered it and have started using it in my project.

I have another use case related to constants declared in a module, not sure if remain can support it.
For example, the following module is used to organize keywords, which are string constants:

/// Keyword to parse command line arguments
pub mod kw {
    pub const CLANG_OPTIONS: &str = "clang-options";
    pub const DEBUG_MODE: &str = "debug-mode";
    pub const DISABLE_NORMALIZE: &str = "disable-normalize";
    pub const DISABLE_OPTIMIZE: &str = "disable-optimize";
    pub const DISABLE_PRINTING: &str = "disable-printing";
    pub const INSTRUMENT_BUG_ANNOTS: &str = "instrument-bug-annots";
    pub const PRINT_COMPILED_PROG: &str = "print-compiled-prog";
    pub const PRINT_OPTIMIZED_PROG: &str = "print-optimized-prog";
    pub const PRINT_NORMALIZED_PROG: &str = "print-normalized-prog";
    pub const RUSTC_OPTIONS: &str = "rustc-options";
    pub const SOLANG_OPTIONS: &str = "solang-options";
    pub const SOLC_OPTIONS: &str = "solc-options";
    pub const COMPILER: &str = "compiler";
}

The list may get longer. So, I wonder if remain can support checking if all constant names are sorted?

It will be very useful to avoid the duplication of constants.

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

No branches or pull requests

1 participant