Commit Graph

11 Commits

Author SHA1 Message Date
thiagopnts
23913ec713 rename deprecated non_uppercase_statics to non_upper_case_globals 2014-11-05 12:04:26 -02:00
Alex Crichton
d03a4b0046 test: Convert statics to constants
Additionally, add lots of tests for new functionality around statics and
`static mut`.
2014-10-09 09:44:52 -07:00
P1start
de7abd8824 Unify non-snake-case lints and non-uppercase statics lints
This unifies the `non_snake_case_functions` and `uppercase_variables` lints
into one lint, `non_snake_case`. It also now checks for non-snake-case modules.
This also extends the non-camel-case types lint to check type parameters, and
merges the `non_uppercase_pattern_statics` lint into the
`non_uppercase_statics` lint.

Because the `uppercase_variables` lint is now part of the `non_snake_case`
lint, all non-snake-case variables that start with lowercase characters (such
as `fooBar`) will now trigger the `non_snake_case` lint.

New code should be updated to use the new `non_snake_case` lint instead of the
previous `non_snake_case_functions` and `uppercase_variables` lints. All use of
the `non_uppercase_pattern_statics` should be replaced with the
`non_uppercase_statics` lint. Any code that previously contained non-snake-case
module or variable names should be updated to use snake case names or disable
the `non_snake_case` lint. Any code with non-camel-case type parameters should
be changed to use camel case or disable the `non_camel_case_types` lint.

[breaking-change]
2014-08-30 09:10:05 +12:00
Patrick Walton
1c16accfc2 libsyntax: Accept use foo as bar; in lieu of use bar as foo;
The old syntax will be removed after a snapshot.

RFC #47.

Issue #16461.
2014-08-14 13:24:50 -07:00
Manish Goregaokar
713e87526e Use new attribute syntax in python files in src/etc too (#13478) 2014-04-14 21:00:31 +05:30
Felix S. Klock II
88d34ff249 fix tests for check-fast. 2013-10-01 18:02:39 +02:00
Felix S. Klock II
06f46902ca fix tests for check-fast. 2013-10-01 18:02:11 +02:00
Felix S. Klock II
e2be7aca08 Expanded test to clarify that the constants *are* matching when they should. 2013-10-01 02:03:43 +02:00
Felix S. Klock II
c0599b1bbb Fix typo in comment. 2013-10-01 01:55:37 +02:00
Felix S. Klock II
924674202e Throwing in another interesting test case: There is no need to warn
about constants that are (non-trivial) paths rather than just
identifiers, regardless of what case their characters are.
2013-10-01 01:51:21 +02:00
Felix S. Klock II
a076fef2b6 Add new lint: non_uppercase_pattern_statics, for #7526.
This tries to warn about code like:
    ```rust
    match (0,0) {
        (0, aha) => { ... },
        ...
    }
    ```
where `aha` is actually a static constant, not a binding.
2013-10-01 01:44:25 +02:00