Skip to content

Commit

Permalink
Initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jan 11, 2023
1 parent 6702ca3 commit 3aa70c9
Show file tree
Hide file tree
Showing 29 changed files with 2,239 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
disallowed-methods = [
# https://internals.rust-lang.org/t/synchronized-ffi-access-to-posix-environment-variable-functions/15475
{ path = "std::env::remove_var", reason = "this function should be considered `unsafe`" },
{ path = "std::env::set_var", reason = "this function should be considered `unsafe`" },
# Since we are using fs-err crate (as `fs`), `fs::*` functions will output a better error.
{ path = "std::fs::canonicalize", reason = "use `fs::canonicalize` instead" },
{ path = "std::fs::copy", reason = "use `fs::copy` instead" },
{ path = "std::fs::create_dir_all", reason = "use `fs::create_dir_all` instead" },
{ path = "std::fs::create_dir", reason = "use `fs::create_dir` instead" },
{ path = "std::fs::hard_link", reason = "use `fs::hard_link` instead" },
{ path = "std::fs::metadata", reason = "use `fs::metadata` instead" },
{ path = "std::fs::read_dir", reason = "use `fs::read_dir` instead" },
{ path = "std::fs::read_link", reason = "use `fs::read_link` instead" },
{ path = "std::fs::read_to_string", reason = "use `fs::read_to_string` instead" },
{ path = "std::fs::read", reason = "use `fs::read` instead" },
{ path = "std::fs::remove_dir_all", reason = "use `fs::remove_dir_all` instead" },
{ path = "std::fs::remove_dir", reason = "use `fs::remove_dir` instead" },
{ path = "std::fs::remove_file", reason = "use `fs::remove_file` instead" },
{ path = "std::fs::rename", reason = "use `fs::rename` instead" },
{ path = "std::fs::set_permissions", reason = "use `fs::set_permissions` instead" },
{ path = "std::fs::symlink_metadata", reason = "use `fs::symlink_metadata` instead" },
{ path = "std::fs::write", reason = "use `fs::write` instead" },
{ path = "std::path::Path::canonicalize", reason = "use `fs::canonicalize` instead" },
{ path = "std::path::Path::metadata", reason = "use `fs::metadata` instead" },
{ path = "std::path::Path::read_dir", reason = "use `fs::read_dir` instead" },
{ path = "std::path::Path::read_link", reason = "use `fs::read_link` instead" },
{ path = "std::path::Path::symlink_metadata", reason = "use `fs::symlink_metadata` instead" },
]
disallowed-types = [
# Since we are using fs-err crate (as `fs`), `fs::*` types will output a better error.
{ path = "std::fs::DirEntry", reason = "use `fs::DirEntry` instead" },
{ path = "std::fs::File", reason = "use `fs::File` instead" },
{ path = "std::fs::OpenOptions", reason = "use `fs::OpenOptions` instead" },
{ path = "std::fs::ReadDir", reason = "use `fs::ReadDir` instead" },
]
49 changes: 49 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "0.2",
"gitignoreRoot": ".",
"useGitignore": true,
"dictionaryDefinitions": [
{
"name": "organization-dictionary",
"path": "./.github/.cspell/organization-dictionary.txt",
"addWords": true
},
{
"name": "project-dictionary",
"path": "./.github/.cspell/project-dictionary.txt",
"addWords": true
},
{
"name": "rust-dependencies",
"path": "./.github/.cspell/rust-dependencies.txt",
"addWords": true
}
],
"dictionaries": [
"organization-dictionary",
"project-dictionary",
"rust-dependencies"
],
"ignoreRegExpList": [
// Copyright notice
"Copyright ((\\(c\\)|\\(C\\)|©) )?.*",
// GHA actions/workflows
"uses: .+@",
// GHA context (repo name, owner name, etc.)
"github.\\w+ (=|!)= '.+'",
// GH username
"( |\\[)@[\\w_-]+",
// Git config username
"git config user.name .*",
// Cargo.toml authors
"authors *= *\\[.*\\]",
"\".* <[\\w_.+-]+@[\\w.-]+>\""
],
"languageSettings": [
{
"languageId": ["*"],
"dictionaries": ["rust"]
}
],
"ignorePaths": []
}
32 changes: 32 additions & 0 deletions .deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
vulnerability = "deny"
unmaintained = "deny"
yanked = "deny"
notice = "deny"
ignore = []

# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
[bans]
multiple-versions = "deny"
wildcards = "allow" # https://github.com/EmbarkStudios/cargo-deny/issues/448
skip = []

# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
default = "deny"
unlicensed = "deny"
copyleft = "deny"
unused-allowed-license = "deny"
private.ignore = true
allow = [
"Apache-2.0",
"MIT",
"Unicode-DFS-2016", # unicode-ident
]

# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-git = []
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# EditorConfig configuration
# https://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,md,yml}]
indent_size = 2

[*.{js,yml}]
quote_type = single

[*.sh]
binary_next_line = true
switch_case_indent = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
115 changes: 115 additions & 0 deletions .github/.cspell/organization-dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// This is a dictionary shared by projects under https://github.com/taiki-e.
// It is not intended for manual editing.

endo
taiki

// tool name and its configs or options
asan
cflags
clippy
codegen
cxxflags
exitcode
miri
miriflags
msan
retag
rustc
rustdoc
rustdocflags
rustflags
rustfmt
rustsec
rustup
valgrind
xcompile
Zdoctest
Zmiri

// Rust target triple
aarch
androideabi
armeb
armebv
armv
asmjs
atmega
bpfeb
bpfel
cuda
eabi
eabihf
emscripten
espidf
fortanix
gnuabi
gnueabi
gnueabihf
gnullvm
gnuspe
gnux
illumos
imac
macabi
mipsel
mipsisa
msvc
muslabi
musleabi
musleabihf
newlibeabihf
nvptx
openwrt
riscv
softfloat
sparcv
thumbeb
thumbebv
thumbv
tvos
uclibc
uclibceabi
uclibceabihf
uefi
vxworks
wasi
watchos
xous

// Rust other
alloc
canonicalize
consts
deque
doctest
hasher
inlateout
intrinsics
lateout
msrv
peekable
punct
repr
rfind
rfold
rsplit
splitn
supertrait
supertraits
toolchains
uninit
upcastable

// Other
connrefused
cygwin
euxo
msys
noninteractive
noprofile
norc
pipefail
powerset
proto
tlsv
2 changes: 2 additions & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
binstall
subcmd
18 changes: 18 additions & 0 deletions .github/.cspell/rust-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This file is @generated by tidy.sh.
// It is not intended for manual editing.

anyhow
camino
cargo
ctrlc
edit
escape
json
lexopt
metadata
serde
shell
slab
termcolor
terminal
toml
2 changes: 2 additions & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
status = ["ci"]
timeout_sec = 7200
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: daily
commit-message:
prefix: ''
labels: []
Loading

0 comments on commit 3aa70c9

Please sign in to comment.