Skip to content

Commit

Permalink
Update readme with codacity badge (#215)
Browse files Browse the repository at this point in the history
* Update readme with codacity badge

* Fix clippy errors

* Fix clippy warning
  • Loading branch information
srhickma authored Nov 23, 2019
1 parent 1d873a9 commit e0f37dd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/42b5507d0a5949ada8f63c1fcc1021e6)](https://www.codacy.com/manual/srhickma/padd?utm_source=github.com&utm_medium=referral&utm_content=srhickma/padd&utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.com/srhickma/padd.svg?branch=master)](https://travis-ci.com/srhickma/padd)
[![Test Coverage](https://codecov.io/gh/srhickma/padd/branch/master/graph/badge.svg)](https://codecov.io/gh/srhickma/padd)
[![Documentation](https://img.shields.io/badge/docs-mkdocs-blue)](https://padd.srhickma.dev)
Expand Down Expand Up @@ -91,7 +92,7 @@ grammar {
}
```
The input:
```
```txt
{ { {{{ }}}
{} } } { {}
}
Expand Down
2 changes: 1 addition & 1 deletion src/cli/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub fn generate_formatter(spec_path: &str) -> Result<Formatter, GenerationError>

let mut sha = Sha256::new();
sha.input_str(&spec[..]);
let spec_sha = sha.result_str().to_string();
let spec_sha = sha.result_str();

let fjr_arc = {
let mut fjr_cache = FJR_CACHE.lock().unwrap();
Expand Down
8 changes: 4 additions & 4 deletions src/core/parse/earley.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ impl<Symbol: GrammarSymbol> Parser<Symbol> for EarleyParser {
lhs: lex[edge.start].clone(),
children: Vec::new(),
production: None,
spm: spm.clone(),
spm,
},
Some(rule) => Tree {
lhs: Token::interior(rule.lhs.clone()),
Expand Down Expand Up @@ -688,7 +688,7 @@ impl<Symbol: GrammarSymbol> Parser<Symbol> for EarleyParser {
Some(production) => Some(production.clone()),
None => None,
},
spm: spm.clone(),
spm,
},
}
}
Expand Down Expand Up @@ -895,7 +895,7 @@ impl<Symbol: GrammarSymbol> Parser<Symbol> for EarleyParser {
lhs: lex[edge.start].clone(),
children: Vec::new(),
production: None,
spm: spm.clone(),
spm,
},
Some(rule) => Tree {
lhs: Token::interior(rule.lhs.clone()),
Expand All @@ -921,7 +921,7 @@ impl<Symbol: GrammarSymbol> Parser<Symbol> for EarleyParser {
Some(production) => Some(production.clone()),
None => None,
},
spm: spm.clone(),
spm,
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/spec/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ where
formatter_builder.add_pattern(PatternPair {
production,
string_production,
pattern: pattern_str.to_string(),
pattern: (*pattern_str).to_string(),
})?;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ grammar {
//verify
assert!(res.is_err());

let mut err: &Error = &res.err().unwrap();
let mut err: &dyn Error = &res.err().unwrap();
assert_eq!(
format!("{}", err),
"Failed to parse specification: Parse error: Recognition failed at token 10: \
Expand Down

0 comments on commit e0f37dd

Please sign in to comment.