Loading maint/add_warning +7 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ import os import re import shutil PAT = re.compile(r'^#!\[(allow|deny|warn)') # ---------- actual list of lints to apply (or disapply) ---------- WANT_LINTS = """ #![deny(missing_docs)] Loading Loading @@ -36,7 +36,8 @@ WANT_LINTS = """ #![warn(clippy::unseparated_literal_suffix)] #![deny(clippy::unwrap_used)] """ WANT_LINTS = [ "%s\n" % w for w in WANT_LINTS.split() ] # ---------- some notes about lints we might use - NOT USED by any code here ---------- SOON=""" """ Loading @@ -57,6 +58,10 @@ DECIDED_NOT = """ #![deny(clippy::pub_enum_variant_names)] """ # ---------- code for autoprocessing Rust source files ---------- WANT_LINTS = [ "%s\n" % w for w in WANT_LINTS.split() ] PAT = re.compile(r'^#!\[(allow|deny|warn)') PAT2 = re.compile(r'^#!\[(allow|deny|warn)\(((?:clippy::)?)([^\)]*)') def warning_key(w): Loading Loading
maint/add_warning +7 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ import os import re import shutil PAT = re.compile(r'^#!\[(allow|deny|warn)') # ---------- actual list of lints to apply (or disapply) ---------- WANT_LINTS = """ #![deny(missing_docs)] Loading Loading @@ -36,7 +36,8 @@ WANT_LINTS = """ #![warn(clippy::unseparated_literal_suffix)] #![deny(clippy::unwrap_used)] """ WANT_LINTS = [ "%s\n" % w for w in WANT_LINTS.split() ] # ---------- some notes about lints we might use - NOT USED by any code here ---------- SOON=""" """ Loading @@ -57,6 +58,10 @@ DECIDED_NOT = """ #![deny(clippy::pub_enum_variant_names)] """ # ---------- code for autoprocessing Rust source files ---------- WANT_LINTS = [ "%s\n" % w for w in WANT_LINTS.split() ] PAT = re.compile(r'^#!\[(allow|deny|warn)') PAT2 = re.compile(r'^#!\[(allow|deny|warn)\(((?:clippy::)?)([^\)]*)') def warning_key(w): Loading