From a144e9db4eaddd705ca7d932c726f9b9b2e4b36e Mon Sep 17 00:00:00 2001 From: Adam Barth <abarth@google.com> Date: Wed, 30 Jan 2019 11:50:23 -0800 Subject: [PATCH] [root] Add root files Test: None. Change-Id: I185ef9e023173ee824027017a951ed6c1c5b9f91 --- .clang-format | 10 ++++++++++ .dir-locals.el | 9 +++++++++ .gitattributes | 10 ++++++++++ .gitignore | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ rustfmt.toml | 15 +++++++++++++++ 5 files changed, 96 insertions(+) create mode 100644 .clang-format create mode 100644 .dir-locals.el create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 rustfmt.toml diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..4bdf24726b7 --- /dev/null +++ b/.clang-format @@ -0,0 +1,10 @@ +# http://clang.llvm.org/docs/ClangFormatStyleOptions.html +BasedOnStyle: Google +# This defaults to 'Auto'. Explicitly set it for a while, so that +# 'vector<vector<int> >' in existing files gets formatted to +# 'vector<vector<int>>'. ('Auto' means that clang-format will only use +# 'int>>' if the file already contains at least one such instance.) +Standard: Cpp11 +SortIncludes: true +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 00000000000..7f1ebfd9eeb --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,9 @@ +;; Copyright 2017 The Fuchsia Authors. All rights reserved. +;; Use of this source code is governed by a BSD-style license that can be +;; found in the LICENSE file. + +( + ;; Expand tabs as spaces. + (c-mode . ((indent-tabs-mode . nil))) + (c++-mode . ((indent-tabs-mode . nil))) +) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..da2e8a59e51 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Always perform LF normalization on these files +*.c text +*.cc text +*.cpp text +*.h text +*.gn text +*.md text diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..bb05aedc1b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,52 @@ +*~ +.*.sw? +.checkstyle +.cipd/ +.classpath +.config +.cproject +.DS_Store +.gdb_history +.gdbinit +.gn +.idea/ +.jiri_manifest +.jiri_root/ +.jiri/ +.landmines +.packages +.project +.pydevproject +.ssh/ +.vscode +*.iml +*.orig +*.pyc +*.sublime-project +*.sublime-workspace +**/Cargo.lock +**/Cargo.toml +/.cipd +build/ +buildtools/ +compile_commands.json +cscope.* +docs/ +garnet/ +go/pkg +infra/ +integration/ +out/ +peridot/ +prebuilt/ +scripts/ +Session.vim +tags +target +third_party/ +Thumbs.db +tools/ +tools/cipd.gni +topaz/ +vendor/ +zircon/ diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000000..57d99426096 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,15 @@ +# Fuchsia Format Style +# last reviewed: Jan 29, 2019 + +# Fuchsia uses 2018 edition only +edition = "2018" + +# The "Default" setting has a heuristic which splits lines too aggresively. +# We are willing to revisit this setting in future versions of rustfmt. +# Bugs: +# * https://github.com/rust-lang/rustfmt/issues/3119 +# * https://github.com/rust-lang/rustfmt/issues/3120 +use_small_heuristics = "Max" + +# Prevent carriage returns +newline_style = "Unix" -- GitLab