]> git.lizzy.rs Git - rust.git/commit
Unify non-snake-case lints and non-uppercase statics lints
authorP1start <rewi-github@whanau.org>
Fri, 18 Jul 2014 12:45:17 +0000 (00:45 +1200)
committerP1start <rewi-github@whanau.org>
Fri, 29 Aug 2014 21:10:05 +0000 (09:10 +1200)
commitde7abd88244a9fe7033cb71e22af0601d1b811b9
tree0f57eaeba2ecc2d72a618872a7e06885d5e611db
parentbd159d3867473ee43959706519066531d76af7ba
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]
51 files changed:
src/doc/guide-ffi.md
src/etc/unicode.py
src/libcollections/hash/mod.rs
src/libcore/char.rs
src/libcore/fmt/mod.rs
src/libcore/str.rs
src/liblibc/lib.rs
src/libnative/io/mod.rs
src/libnative/io/process.rs
src/libnum/bigint.rs
src/librbml/lib.rs
src/libregex/test/bench.rs
src/librustc/diagnostics.rs
src/librustc/lint/builtin.rs
src/librustc/lint/context.rs
src/librustc/middle/trans/build.rs
src/librustc/middle/trans/cabi_arm.rs
src/librustc/middle/trans/cabi_mips.rs
src/librustc/middle/trans/cabi_x86_64.rs
src/librustc/middle/trans/common.rs
src/librustc/middle/trans/debuginfo.rs
src/librustc/middle/trans/intrinsic.rs
src/librustc/middle/trans/type_.rs
src/librustc/middle/ty.rs
src/librustc/util/nodemap.rs
src/librustc_llvm/lib.rs
src/librustdoc/flock.rs
src/librustrt/libunwind.rs
src/librustrt/mutex.rs
src/librustrt/thread.rs
src/librustrt/thread_local_storage.rs
src/libserialize/json.rs
src/libserialize/serialize.rs
src/libstd/dynamic_lib.rs
src/libstd/os.rs
src/libstd/rand/os.rs
src/libstd/rt/backtrace.rs
src/libsyntax/abi.rs
src/libsyntax/ast.rs
src/libterm/win.rs
src/libunicode/tables.rs
src/libunicode/u_char.rs
src/test/bench/shootout-spectralnorm.rs
src/test/bench/sudoku.rs
src/test/compile-fail/lint-non-camel-case-types.rs
src/test/compile-fail/lint-non-snake-case-functions.rs
src/test/compile-fail/lint-non-snake-case-lifetimes.rs [new file with mode: 0644]
src/test/compile-fail/lint-non-snake-case-modules.rs [new file with mode: 0644]
src/test/compile-fail/lint-uppercase-variables.rs
src/test/compile-fail/match-static-const-lc.rs
src/test/run-pass/match-static-const-rename.rs