-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
5,922 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Disable automatic end-of-line conversion for all files | ||
* -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Toolchain | ||
run: | | ||
rustup update ${{ matrix.toolchain }} | ||
rustup default ${{ matrix.toolchain }} | ||
- name: Build | ||
run: cargo build --verbose --features="fail-on-warnings" | ||
- name: Test | ||
run: cargo test --verbose --features="fail-on-warnings" | ||
- name: Docs | ||
run: cargo doc --no-deps --features="fail-on-warnings" | ||
|
||
stylecheck: | ||
runs-on: ubuntu-24.04 | ||
container: librepcb/librepcb-dev:devtools-4 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Stylecheck | ||
run: .github/workflows/stylecheck.sh | ||
- name: Cargo Clippy | ||
run: cargo clippy --features="fail-on-warnings" | ||
- name: Reuse Lint | ||
run: reuse --suppress-deprecation lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# set shell settings (see https://sipb.mit.edu/doc/safe-shell/) | ||
set -euv -o pipefail | ||
|
||
# fix git error | ||
git config --global --add safe.directory $PWD | ||
|
||
# check if all files have Unix line endings | ||
(git grep -Il $'\r' -- ':/') && exit 1 | ||
|
||
# check if no file contains trailing spaces | ||
(git grep -Il ' $' -- ':/') && exit 1 | ||
|
||
# check if no file contains tabulators (with some exceptions) | ||
(git grep -Il $'\t' -- ':/' ':!/LICENSES/') && exit 1 | ||
|
||
# check rust code formatting | ||
for f in $(git ls-files -- '*.rs'); do | ||
(rustfmt --check "$f") || exit 1 | ||
done | ||
|
||
# check formatting of .reuse/dep5 | ||
(debian-copyright-sorter --iml -s casefold -o ".reuse/dep5" ".reuse/dep5") || exit 1 | ||
(git diff --exit-code -- ".reuse/dep5") || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: interactive-html-bom-rs | ||
Source: https://github.com/LibrePCB/interactive-html-bom-rs | ||
|
||
Files: | ||
.gitattributes | ||
.github/* | ||
.gitignore | ||
.rustfmt.toml | ||
Cargo.toml | ||
README.md | ||
src/**.rs | ||
src/web/version.txt | ||
tests/**.rs | ||
update_web_files.sh | ||
Copyright: LibrePCB Developers | ||
License: MIT | ||
|
||
Files: | ||
src/web/ibom.css | ||
src/web/ibom.html | ||
src/web/ibom.js | ||
src/web/render.js | ||
src/web/table-util.js | ||
src/web/util.js | ||
Copyright: InteractiveHtmlBom | ||
License: MIT | ||
|
||
Files: src/web/split.js | ||
Copyright: Split.js | ||
License: MIT | ||
|
||
Files: src/web/pep.js | ||
Copyright: jQuery Foundation and other contributors | ||
License: MIT | ||
|
||
Files: src/web/lz-string.js | ||
Copyright: 2013 Pieroxy <[email protected]> | ||
License: WTFPL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
edition = "2021" | ||
hard_tabs = false | ||
max_width = 80 | ||
newline_style = "Unix" | ||
tab_spaces = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "interactive-html-bom" | ||
description = "Interactive HTML BOM Generator" | ||
keywords = ["pcb", "eda", "bom"] | ||
repository = "https://github.com/LibrePCB/interactive-html-bom-rs" | ||
readme = "README.md" | ||
license = "MIT" | ||
version = "0.1.0" | ||
edition = "2021" | ||
exclude = ["/.git*", "/.reuse/", "/.rustfmt.toml", "/LICENSES/", "*.sh"] | ||
|
||
[features] | ||
fail-on-warnings = [] | ||
|
||
[dependencies] | ||
jzon = "0.12.5" | ||
lz-str = "0.2.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 LibrePCB | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Copyright (C) 2004 Sam Hocevar <[email protected]> | ||
|
||
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. | ||
|
||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
Oops, something went wrong.