feat: add CLI to drive I/O testing #54
Annotations
5 errors and 2 warnings
passing a unit value to a function:
rdftk_io/src/turtle/writer.rs#L662
error: passing a unit value to a function
--> rdftk_io/src/turtle/writer.rs:662:9
|
662 | / Ok(if let Some(literal) = literal.as_literal() {
663 | | match literal.data_type() {
664 | | Some(DataType::Iri) => {
665 | | let iri = Iri::parse(literal.lexical_form())?;
... |
694 | | panic!("ERROR: this is not a literal: {:?}", literal)
695 | | })
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `-D clippy::unit-arg` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unit_arg)]`
help: move the expression in front of the call and replace it with the unit literal `()`
|
662 ~ if let Some(literal) = literal.as_literal() {
663 + match literal.data_type() {
664 + Some(DataType::Iri) => {
665 + let iri = Iri::parse(literal.lexical_form())?;
666 + self.write_iri(w, graph, &iri)?
667 + }
668 + Some(DataType::Boolean)
669 + | Some(DataType::Long)
670 + | Some(DataType::Int)
671 + | Some(DataType::Short)
672 + | Some(DataType::Byte)
673 + | Some(DataType::UnsignedLong)
674 + | Some(DataType::UnsignedInt)
675 + | Some(DataType::UnsignedShort)
676 + | Some(DataType::UnsignedByte)
677 + | Some(DataType::Float)
678 + | Some(DataType::Double)
679 + | Some(DataType::Decimal) => write!(w, "{}", literal.lexical_form())?,
680 + _ => {
681 + write!(w, "{:?}", literal.lexical_form())?;
682 + match (literal.data_type(), literal.language()) {
683 + (Some(data_type), None) => {
684 + write!(w, "{DATATYPE_PREFIX}")?;
685 + let iri = data_type.as_iri();
686 + self.write_iri(w, graph, iri)?;
687 + }
688 + (None, Some(language)) => write!(w, "{LANGUAGE_PREFIX}{}", language)?,
689 + _ => (),
690 + }
691 + }
692 + }
693 + } else {
694 + panic!("ERROR: this is not a literal: {:?}", literal)
695 + };
696 + Ok(())
|
|
constant `COLLECTION_END` is never used:
rdftk_io/src/turtle/writer.rs#L122
error: constant `COLLECTION_END` is never used
--> rdftk_io/src/turtle/writer.rs:122:7
|
122 | const COLLECTION_END: &str = ")";
| ^^^^^^^^^^^^^^
|
constant `COLLECTION_START` is never used:
rdftk_io/src/turtle/writer.rs#L121
error: constant `COLLECTION_START` is never used
--> rdftk_io/src/turtle/writer.rs:121:7
|
121 | const COLLECTION_START: &str = "(";
| ^^^^^^^^^^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
|
empty line after doc comment:
rdftk_iri/src/lib.rs#L233
error: empty line after doc comment
--> rdftk_iri/src/lib.rs:233:5
|
233 | / ///
234 | |
| |_
...
255 | fn with_empty_fragment(&self) -> Self;
| -------------------------------------- the comment documents this method
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
234 | ///
|
|
empty line after doc comment:
rdftk_iri/src/lib.rs#L233
error: empty line after doc comment
--> rdftk_iri/src/lib.rs:233:5
|
233 | / ///
234 | |
| |_^
...
255 | fn with_empty_fragment(&self) -> Self;
| -------------------------------------- the comment documents this method
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
234 | ///
|
|
security_audit
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
security_audit
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|