Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
License Headers (#90)
Browse files Browse the repository at this point in the history
* Move away from mod.rs convention

* Update CI tooling to check for license headers and have same formatting
as radicle-link.

Add license headers to files and run formatting over them.

* Check test and example dirs as well
  • Loading branch information
FintanH authored Mar 26, 2020
1 parent d80059b commit eca0de0
Show file tree
Hide file tree
Showing 24 changed files with 1,433 additions and 205 deletions.
18 changes: 10 additions & 8 deletions .buildkite/docker/rust-nightly/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ FROM debian:buster-slim
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
clang \
curl \
gcc \
jq \
libssl-dev \
pkg-config \
ca-certificates \
clang \
curl \
gcc \
jq \
libc6-dev \
libssl-dev \
make \
pkg-config \
; \
apt-get autoremove; \
rm -rf /var/lib/apt/lists/*
Expand All @@ -35,7 +37,7 @@ RUN set -eux; \
cargo --version; \
rustc --version; \
rustup component add clippy rustfmt; \
cargo install sccache cargo-deb; \
cargo install sccache cargo-deb cargo-deny; \
rm -rf /usr/local/cargo/registry; \
rm /usr/local/cargo/.package-cache;

Expand Down
11 changes: 2 additions & 9 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
env:
DOCKER_IMAGE: gcr.io/opensourcecoin/radicle-surf-build@sha256:5be613920b04adea96ee6b60ee864e93e32a4bfb7582ddf87dd9544ceb9f33cc
DOCKER_IMAGE: gcr.io/opensourcecoin/radicle-surf-build
DOCKER_FILE: .buildkite/docker/rust-nightly/Dockerfile

steps:
- label: "Build, lint, test"
commands:
- "echo '--- Formatting'"
- "cargo fmt -- --check"
- "echo '--- Bestest Practices'"
- "cargo clippy --all-targets --all-features -- -D warnings"
- "echo '--- Documentationz'"
- "cargo doc"
- "echo '--- Tests'"
- "cargo test --all"
- "ci/run"
agents:
production: "true"
platform: "linux"
17 changes: 17 additions & 0 deletions .license-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file is part of radicle-surf
// <https://github.com/radicle-dev/radicle-surf>
//
// Copyright (C) 2019-2020 The Radicle Team <[email protected]>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 3 or
// later as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

30 changes: 23 additions & 7 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
unstable_features = true
max_width = 100

# comments
comment_width = 100
comment_width = 80
wrap_comments = true
hard_tabs = false
tab_spaces = 4
imports_layout = "HorizontalVertical"
merge_imports = true

newline_style = "Unix"
use_small_heuristics = "Default"

# imports
reorder_imports = true
reorder_modules = true

# strings
format_strings = false
remove_nested_parens = true

max_width = 100
fn_args_layout = "Tall"

edition = "2018"

match_block_trailing_comma = true

merge_derives = true

use_try_shorthand = false
use_field_init_shorthand = false

force_explicit_abi = true

license_template_path = ".license-header"
1 change: 1 addition & 0 deletions COPYING
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name = "radicle-surf"
description = "A code surfing library for VCS file systems"
readme = "README.md"
version = "0.2.1"
authors = ["Monadic GmbH <radicle@monadic.xyz>"]
authors = ["The Radicle Team <dev@radicle.xyz>"]
edition = "2018"
homepage = "https://github.com/radicle-dev/radicle-surf"
repository = "https://github.com/radicle-dev/radicle-surf"
license = "GPL-3.0-only"
license = "GPL-3.0-or-later"

[dependencies]
git2 = "0.12"
Expand Down
Loading

0 comments on commit eca0de0

Please sign in to comment.