Adds a typo linter as part of the CI

pull/380/head
Tpt 1 year ago committed by Thomas Tanon
parent 6dc4aefe99
commit afdb1f76e8
  1. 8
      .github/workflows/tests.yml
  2. 4
      CHANGELOG.md
  3. 6
      lib/spargebra/src/parser.rs
  4. 2
      lib/src/sparql/plan_builder.rs
  5. 2
      server/src/main.rs
  6. 8
      testsuite/oxigraph-tests/sparql/manifest.ttl
  7. 2
      typos.toml

@ -227,6 +227,14 @@ jobs:
- run: python -m unittest
working-directory: ./python/tests
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo install typos-cli || true
- run: typos
fuzz_changes:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

@ -51,7 +51,7 @@
- SPARQL: fixes serialization of SPARQL queries (property path and STRSTARTS function).
- SPARQL: slightly optimize aggregates by avoiding an unneeded projection.
- SPARQL: the parser now cleanly fails if invalid `VALUES` clauses are provided.
- SPARQL: In DELETE/INSERT UPDATEs the currently written values can't be read anymore ("Halloween problem").
- SPARQL: In DELETE/INSERT UPDATE the currently written values can't be read anymore ("Halloween problem").
- `oxrdf`: makes Clippy run without warnings when `rdf-star` is disable.
- Python: makes type annotations compatible with Python 3.7.
- Python: makes sure the parameter default value is always included in the type annotation.
@ -215,7 +215,7 @@
- Server: The HTTP response bodies are now generated on the fly instead of being buffered.
- Python: The `SledStore` and `MemoryStore` classes have been removed in favor of the `Store` class.
- JS: The `MemoryStore` class has been renamed to `Store`.
- JS: The [RDF/JS `DataFactory` interface](http://rdf.js.org/data-model-spec/#datafactory-interface) is now implemented by the `oxigraph` module itself and the `MemoryStore.dataFactory` propery has been removed.
- JS: The [RDF/JS `DataFactory` interface](http://rdf.js.org/data-model-spec/#datafactory-interface) is now implemented by the `oxigraph` module itself and the `MemoryStore.dataFactory` property has been removed.
- The implementation of SPARQL evaluation has been improved for better performances (especially joins).
- The TLS implementation used in SPARQL HTTP calls is now [rustls](https://github.com/rustls/rustls) and not [native-tls](https://github.com/sfackler/rust-native-tls). The host system certificate registry is still used.
- Spargebra: The basic RDF terms are now the ones of the `oxrdf` crate.

@ -442,7 +442,7 @@ impl Selection {
fn build_select(
select: Selection,
wher: GraphPattern,
r#where: GraphPattern,
mut group: Option<(Vec<Variable>, Vec<(Expression, Variable)>)>,
having: Option<Expression>,
order_by: Option<Vec<OrderExpression>>,
@ -450,7 +450,7 @@ fn build_select(
values: Option<GraphPattern>,
state: &mut ParserState,
) -> Result<GraphPattern, &'static str> {
let mut p = wher;
let mut p = r#where;
let mut with_aggregate = false;
//GROUP BY
@ -1429,7 +1429,7 @@ parser! {
}
});
if contains {
return Err("An existing variable is overriden in the right side of LATERAL");
return Err("An existing variable is overridden in the right side of LATERAL");
}
g = GraphPattern::Lateral { left: Box::new(g), right: Box::new(p) }
}

@ -144,7 +144,7 @@ impl<'a> PlanBuilder<'a> {
Box::new(self.build_for_expression(expr, variables, graph_name)?),
),
GraphPattern::Union { left, right } => {
//We flatten the UNIONs
//We flatten the UNION
let mut stack: Vec<&GraphPattern> = vec![left, right];
let mut children = vec![];
loop {

@ -1505,7 +1505,7 @@ mod tests {
// PUT - mismatched payload
let request = Request::builder(Method::PUT, "http://localhost/store/person/1.ttl".parse()?)
.with_header(HeaderName::CONTENT_TYPE, "text/turtle; charset=utf-8")?
.with_body("@prefix fo");
.with_body("@prefix foo");
server.test_status(request, Status::BAD_REQUEST)?;
// PUT - empty graph

@ -35,19 +35,19 @@
) .
:small_unicode_escape_with_multibytes_char rdf:type mf:NegativeSyntaxTest ;
mf:name "Multibytes character at the end of a unicode espace sequence" ;
mf:name "Multibytes character at the end of a unicode escape sequence" ;
mf:action <small_unicode_escape_with_multibytes_char.rq> .
:long_unicode_escape_with_multibytes_char rdf:type mf:NegativeSyntaxTest ;
mf:name "Multibytes character at the end of a unicode espace sequence" ;
mf:name "Multibytes character at the end of a unicode escape sequence" ;
mf:action <long_unicode_escape_with_multibytes_char.rq> .
:small_unicode_escape_with_multibytes_char_update rdf:type mf:NegativeUpdateSyntaxTest11 ;
mf:name "Multibytes character at the end of a unicode espace sequence" ;
mf:name "Multibytes character at the end of a unicode escape sequence" ;
mf:action <small_unicode_escape_with_multibytes_char.ru> .
:long_unicode_escape_with_multibytes_char_update rdf:type mf:NegativeUpdateSyntaxTest11 ;
mf:name "Multibytes character at the end of a unicode espace sequence" ;
mf:name "Multibytes character at the end of a unicode escape sequence" ;
mf:action <long_unicode_escape_with_multibytes_char.ru> .
:describe rdf:type mf:QueryEvaluationTest ;

@ -0,0 +1,2 @@
[files]
extend-exclude = ["**/*.svg"]
Loading…
Cancel
Save