Run clippy on workspace in CI (#4614)
This commit is contained in:
parent
140df92d79
commit
eddf9f0b7f
3 changed files with 4 additions and 3 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -101,7 +101,7 @@ jobs:
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --all-targets -- -D warnings
|
args: --workspace --all-targets -- -D warnings
|
||||||
|
|
||||||
- name: Run cargo doc
|
- name: Run cargo doc
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|
|
@ -148,6 +148,7 @@ pub fn plain(s: &str, selection: Selection) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
#[allow(clippy::module_inception)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ pub fn query_check() -> Result<(), DynError> {
|
||||||
let language_name = &language.language_id;
|
let language_name = &language.language_id;
|
||||||
let grammar_name = language.grammar.as_ref().unwrap_or(language_name);
|
let grammar_name = language.grammar.as_ref().unwrap_or(language_name);
|
||||||
for query_file in query_files {
|
for query_file in query_files {
|
||||||
let language = get_language(&grammar_name);
|
let language = get_language(grammar_name);
|
||||||
let query_text = read_query(&language_name, query_file);
|
let query_text = read_query(language_name, query_file);
|
||||||
if let Ok(lang) = language {
|
if let Ok(lang) = language {
|
||||||
if !query_text.is_empty() {
|
if !query_text.is_empty() {
|
||||||
if let Err(reason) = Query::new(lang, &query_text) {
|
if let Err(reason) = Query::new(lang, &query_text) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue