Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Clippy support #4

Closed
samuelmeuli opened this issue Jan 1, 2020 · 4 comments
Closed

Add Clippy support #4

samuelmeuli opened this issue Jan 1, 2020 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers stale

Comments

@samuelmeuli
Copy link
Collaborator

See https://github.com/rust-lang/rust-clippy

@samuelmeuli samuelmeuli added the enhancement New feature or request label Jan 1, 2020
@samuelmeuli samuelmeuli added the good first issue Good for newcomers label Feb 22, 2020
@Krenodeno
Copy link
Contributor

Hi,
I wonder what does it take to support a linter like Clippy ?
Is reading the standard output a good way to do it ?
Surely if the linter can output in a defined format it should be easier (Or does it?)

@lights0123
Copy link

lights0123 commented Jun 2, 2020

cargo clippy --message-format json will output all lints as JSON to stdout. Here's a sample output:

Output

{"reason":"compiler-artifact","package_id":"memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.3.3/build.rs","edition":"2015","doctest":false},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/build/memchr-a1ba9235ff0e394e/build-script-build"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-1.2.1/build.rs","edition":"2015","doctest":false},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default"],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/build/bitflags-6de1ffcc56ec72ff/build-script-build"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"cty 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"cty","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/cty-0.2.1/src/lib.rs","edition":"2015","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libcty-57fe34cf611e60e6.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"cty 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"cty","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/cty-0.1.5/src/lib.rs","edition":"2015","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libcty-2c6dff6f6e65d844.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"failure","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.8/src/lib.rs","edition":"2015","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libfailure-8175465a1d2f7814.rmeta"],"executable":null,"fresh":true}
{"reason":"build-script-executed","package_id":"memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)","linked_libs":[],"linked_paths":[],"cfgs":["memchr_runtime_simd","memchr_runtime_sse2","memchr_runtime_sse42","memchr_runtime_avx"],"env":[],"out_dir":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/build/memchr-b777bc8951a29cd0/out"}
{"reason":"build-script-executed","package_id":"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)","linked_libs":[],"linked_paths":[],"cfgs":["bitflags_const_fn"],"env":[],"out_dir":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/build/bitflags-299917990c532f18/out"}
{"reason":"compiler-artifact","package_id":"ndless-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-sys","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/ndless-sys-0.2.0/src/lib.rs","edition":"2018","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libndless_sys-b31bad4ee99d5046.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"embedded-freetype-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"embedded-freetype-sys","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-freetype-sys-0.2.0/src/lib.rs","edition":"2018","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libembedded_freetype_sys-2bab0a007d5ce07e.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"memchr","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.3.3/src/lib.rs","edition":"2015","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libmemchr-82cb1dbafd7ea501.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"bitflags","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-1.2.1/src/lib.rs","edition":"2015","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default"],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libbitflags-938ce14d136842b0.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-artifact","package_id":"cstr_core 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)","target":{"kind":["lib"],"crate_types":["lib"],"name":"cstr_core","src_path":"/home/benschattinger/.cargo/registry/src/github.com-1ecc6299db9ec823/cstr_core-0.1.2/src/lib.rs","edition":"2015","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["alloc"],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libcstr_core-cfdd6fc82a029dd1.rmeta"],"executable":null,"fresh":true}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/bitmap.rs:57:2\n   |\n57 |       pub unsafe fn from_raw(raw: *const ffi::FT_Bitmap) -> Self {\n   |  _____^\n58 | |         Bitmap { raw }\n59 | |     }\n   | |_____^\n   |\n   = note: `#[warn(clippy::missing_safety_doc)]` on by default\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"note","message":"`#[warn(clippy::missing_safety_doc)]` on by default","rendered":null,"spans":[]},{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":2223,"byte_start":2143,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/bitmap.rs","is_primary":true,"label":null,"line_end":59,"line_start":57,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":62,"highlight_start":2,"text":"\tpub unsafe fn from_raw(raw: *const ffi::FT_Bitmap) -> Self {"},{"highlight_end":17,"highlight_start":1,"text":"\t\tBitmap { raw }"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/bitmap_glyph.rs:10:2\n   |\n10 |       pub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_BitmapGlyph) -> Self {\n   |  _____^\n11 | |         ffi::FT_Reference_Library(library_raw);\n12 | |         BitmapGlyph { library_raw, raw }\n13 | |     }\n   | |_____^\n   |\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":325,"byte_start":157,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/bitmap_glyph.rs","is_primary":true,"label":null,"line_end":13,"line_start":10,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":90,"highlight_start":2,"text":"\tpub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_BitmapGlyph) -> Self {"},{"highlight_end":42,"highlight_start":1,"text":"\t\tffi::FT_Reference_Library(library_raw);"},{"highlight_end":35,"highlight_start":1,"text":"\t\tBitmapGlyph { library_raw, raw }"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/face.rs:71:2\n   |\n71 |       pub unsafe fn from_raw(\n   |  _____^\n72 | |         library_raw: ffi::FT_Library,\n73 | |         raw: ffi::FT_Face,\n74 | |         bytes: Option<Rc<Vec<u8>>>,\n...  |\n82 | |         }\n83 | |     }\n   | |_____^\n   |\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":2644,"byte_start":2375,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/face.rs","is_primary":true,"label":null,"line_end":83,"line_start":71,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":25,"highlight_start":2,"text":"\tpub unsafe fn from_raw("},{"highlight_end":32,"highlight_start":1,"text":"\t\tlibrary_raw: ffi::FT_Library,"},{"highlight_end":21,"highlight_start":1,"text":"\t\traw: ffi::FT_Face,"},{"highlight_end":30,"highlight_start":1,"text":"\t\tbytes: Option<Rc<Vec<u8>>>,"},{"highlight_end":13,"highlight_start":1,"text":"\t) -> Self {"},{"highlight_end":42,"highlight_start":1,"text":"\t\tffi::FT_Reference_Library(library_raw);"},{"highlight_end":9,"highlight_start":1,"text":"\t\tFace {"},{"highlight_end":16,"highlight_start":1,"text":"\t\t\tlibrary_raw,"},{"highlight_end":8,"highlight_start":1,"text":"\t\t\traw,"},{"highlight_end":58,"highlight_start":1,"text":"\t\t\tglyph: GlyphSlot::from_raw(library_raw, (*raw).glyph),"},{"highlight_end":10,"highlight_start":1,"text":"\t\t\tbytes,"},{"highlight_end":4,"highlight_start":1,"text":"\t\t}"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/glyph.rs:14:2\n   |\n14 |       pub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_Glyph) -> Self {\n   |  _____^\n15 | |         ffi::FT_Reference_Library(library_raw);\n16 | |         Glyph { library_raw, raw }\n17 | |     }\n   | |_____^\n   |\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":531,"byte_start":375,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/glyph.rs","is_primary":true,"label":null,"line_end":17,"line_start":14,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":84,"highlight_start":2,"text":"\tpub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_Glyph) -> Self {"},{"highlight_end":42,"highlight_start":1,"text":"\t\tffi::FT_Reference_Library(library_raw);"},{"highlight_end":29,"highlight_start":1,"text":"\t\tGlyph { library_raw, raw }"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/glyph_slot.rs:46:2\n   |\n46 |       pub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_GlyphSlot) -> Self {\n   |  _____^\n47 | |         GlyphSlot { library_raw, raw }\n48 | |     }\n   | |_____^\n   |\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":1182,"byte_start":1060,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/glyph_slot.rs","is_primary":true,"label":null,"line_end":48,"line_start":46,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":88,"highlight_start":2,"text":"\tpub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_GlyphSlot) -> Self {"},{"highlight_end":33,"highlight_start":1,"text":"\t\tGlyphSlot { library_raw, raw }"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/outline.rs:18:2\n   |\n18 |       pub unsafe fn from_raw(raw: &'a ffi::FT_Outline) -> Self {\n   |  _____^\n19 | |         Outline { raw }\n20 | |     }\n   | |_____^\n   |\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":377,"byte_start":298,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/outline.rs","is_primary":true,"label":null,"line_end":20,"line_start":18,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":60,"highlight_start":2,"text":"\tpub unsafe fn from_raw(raw: &'a ffi::FT_Outline) -> Self {"},{"highlight_end":18,"highlight_start":1,"text":"\t\tOutline { raw }"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/outline.rs:51:2\n   |\n51 |       pub unsafe fn from_raw(outline: &'a ffi::FT_Outline, start_idx: isize, end_idx: isize) -> Self {\n   |  _____^\n52 | |         CurveIterator {\n53 | |             start_point: outline.points.offset(start_idx),\n54 | |             start_tag: outline.tags.offset(start_idx),\n...  |\n58 | |         }\n59 | |     }\n   | |_____^\n   |\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":1399,"byte_start":1111,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/outline.rs","is_primary":true,"label":null,"line_end":59,"line_start":51,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":98,"highlight_start":2,"text":"\tpub unsafe fn from_raw(outline: &'a ffi::FT_Outline, start_idx: isize, end_idx: isize) -> Self {"},{"highlight_end":18,"highlight_start":1,"text":"\t\tCurveIterator {"},{"highlight_end":50,"highlight_start":1,"text":"\t\t\tstart_point: outline.points.offset(start_idx),"},{"highlight_end":46,"highlight_start":1,"text":"\t\t\tstart_tag: outline.tags.offset(start_idx),"},{"highlight_end":11,"highlight_start":1,"text":"\t\t\tidx: 0,"},{"highlight_end":36,"highlight_start":1,"text":"\t\t\tlength: end_idx - start_idx + 1,"},{"highlight_end":24,"highlight_start":1,"text":"\t\t\tmarker: PhantomData,"},{"highlight_end":4,"highlight_start":1,"text":"\t\t}"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n   --> ndless-freetype/src/outline.rs:131:2\n    |\n131 |       pub unsafe fn from_raw(outline: &'a ffi::FT_Outline) -> Self {\n    |  _____^\n132 | |         ContourIterator {\n133 | |             outline,\n134 | |             contour_start: 0,\n...   |\n137 | |         }\n138 | |     }\n    | |_____^\n    |\n    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":3454,"byte_start":3219,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/outline.rs","is_primary":true,"label":null,"line_end":138,"line_start":131,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":64,"highlight_start":2,"text":"\tpub unsafe fn from_raw(outline: &'a ffi::FT_Outline) -> Self {"},{"highlight_end":20,"highlight_start":1,"text":"\t\tContourIterator {"},{"highlight_end":12,"highlight_start":1,"text":"\t\t\toutline,"},{"highlight_end":21,"highlight_start":1,"text":"\t\t\tcontour_start: 0,"},{"highlight_end":38,"highlight_start":1,"text":"\t\t\tcontour_end_idx: outline.contours,"},{"highlight_end":75,"highlight_start":1,"text":"\t\t\tlast_end_idx: outline.contours.offset(outline.n_contours as isize - 1),"},{"highlight_end":4,"highlight_start":1,"text":"\t\t}"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: unsafe function's docs miss `# Safety` section\n  --> ndless-freetype/src/stroker.rs:26:2\n   |\n26 |       pub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_Stroker) -> Self {\n   |  _____^\n27 | |         ffi::FT_Reference_Library(library_raw);\n28 | |         Stroker { library_raw, raw }\n29 | |     }\n   | |_____^\n   |\n   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc\n\n","children":[{"children":[],"code":null,"level":"help","message":"for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc","rendered":null,"spans":[]}],"code":{"code":"clippy::missing_safety_doc","explanation":null},"level":"warning","message":"unsafe function's docs miss `# Safety` section","spans":[{"byte_end":758,"byte_start":598,"column_end":3,"column_start":2,"expansion":null,"file_name":"ndless-freetype/src/stroker.rs","is_primary":true,"label":null,"line_end":29,"line_start":26,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":86,"highlight_start":2,"text":"\tpub unsafe fn from_raw(library_raw: ffi::FT_Library, raw: ffi::FT_Stroker) -> Self {"},{"highlight_end":42,"highlight_start":1,"text":"\t\tffi::FT_Reference_Library(library_raw);"},{"highlight_end":31,"highlight_start":1,"text":"\t\tStroker { library_raw, raw }"},{"highlight_end":3,"highlight_start":1,"text":"\t}"}]}]}}
{"reason":"compiler-message","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"message":{"rendered":"warning: 9 warnings emitted\n\n","children":[],"code":null,"level":"warning","message":"9 warnings emitted","spans":[]}}
{"reason":"compiler-artifact","package_id":"ndless-freetype 0.1.3 (path+file:///home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype)","target":{"kind":["lib"],"crate_types":["lib"],"name":"ndless-freetype","src_path":"/home/benschattinger/Documents/Projects/Calculator/ndless-rs/ndless-freetype/src/lib.rs","edition":"2018","doctest":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/benschattinger/Documents/Projects/Calculator/ndless-rs/target/debug/deps/libndless_freetype-67827103bc0bfeae.rmeta"],"executable":null,"fresh":true}
{"reason":"build-finished","success":true}

The final message, {"reason":"build-finished","success":true}, has a success key which will give the overall status. You can look at the messages where reason === 'compiler-message', and use the highlight_start and highlight_end keys to do annotations.

@Krenodeno
Copy link
Contributor

I opened a PR: #62

@github-actions
Copy link
Contributor

A stale label has been added to this issue because it has been open 15 days with no activity. To keep this issue open, add a comment within 5 days.

@github-actions github-actions bot added the stale label May 27, 2021
@github-actions github-actions bot closed this as completed Jun 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers stale
Projects
None yet
Development

No branches or pull requests

3 participants