srctree

Robin Linden parent 930f036e 6086db11
build: Format everything with prettier

I noticed I introduced inconsistent indentation in css/default.css ind31d5f3664d00be5c0f08038166b3ece1fe53831 and figured I'd set up CI tomake sure it doesn't happen again.

inlinesplit
.clang-format added: 211, removed: 131, total 80
@@ -1,10 +1,10 @@
---
Language: Cpp
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignOperands: DontAlign
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
@@ -25,21 +25,21 @@ AttributeMacros:
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
@@ -53,8 +53,8 @@ BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 120
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
@@ -62,7 +62,7 @@ ContinuationIndentWidth: 8
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
DisableFormat: false
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
@@ -72,36 +72,36 @@ ForEachMacros:
- BOOST_FOREACH
StatementAttributeLikeMacros:
- Q_EMIT
IncludeBlocks: Preserve
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: ".*"
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: "(Test)?$"
IncludeIsMainSourceRegex: ""
IndentCaseLabels: True
IndentCaseBlocks: False
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 4
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
@@ -120,8 +120,8 @@ PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Right
QualifierAlignment: Right
ReflowComments: true
SortIncludes: true
ReflowComments: true
SortIncludes: true
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
@@ -138,7 +138,7 @@ SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
@@ -146,18 +146,18 @@ SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...
---
 
 
.github/workflows/ci.yaml added: 211, removed: 131, total 80
@@ -49,56 +49,56 @@ jobs:
apt: libc++abi-14-dev libc++-14-dev
 
steps:
- name: Setup gcc
if: startsWith(matrix.compiler, 'gcc')
run: |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
- name: Setup clang
if: startsWith(matrix.compiler, 'clang')
run: |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Install
run: |
sudo apt update
sudo apt install libgl-dev ${{ matrix.compiler }}-${{ matrix.version }} ${{ matrix.apt }}
- uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: ${{ matrix.name }}-${{ hashFiles('WORKSPACE', 'third_party/**') }}
restore-keys: ${{ matrix.name }}-
- name: Build
run: bazel build //... ${{ matrix.bazel }}
- name: Test
run: bazel test //... ${{ matrix.bazel }}
- name: Run
run: bazel run browser:tui ${{ matrix.bazel }}
- name: Setup gcc
if: startsWith(matrix.compiler, 'gcc')
run: |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
- name: Setup clang
if: startsWith(matrix.compiler, 'clang')
run: |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Install
run: |
sudo apt update
sudo apt install libgl-dev ${{ matrix.compiler }}-${{ matrix.version }} ${{ matrix.apt }}
- uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: ${{ matrix.name }}-${{ hashFiles('WORKSPACE', 'third_party/**') }}
restore-keys: ${{ matrix.name }}-
- name: Build
run: bazel build //... ${{ matrix.bazel }}
- name: Test
run: bazel test //... ${{ matrix.bazel }}
- name: Run
run: bazel run browser:tui ${{ matrix.bazel }}
 
linux-gcc-10-coverage:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: ${{ matrix.name }}-${{ hashFiles('WORKSPACE', 'third_party/**') }}
restore-keys: ${{ matrix.name }}-
- name: Install
run: |
sudo apt update
sudo apt install libgl-dev lcov
- name: Setup
run: |
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
- name: Coverage
run: bazel coverage --combined_report=lcov --config=gcc //...
- name: Summary
run: lcov --summary bazel-out/_coverage/_coverage_report.dat
- name: Upload
run: bash <(curl -s https://codecov.io/bash) -f bazel-out/_coverage/_coverage_report.dat
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: ${{ matrix.name }}-${{ hashFiles('WORKSPACE', 'third_party/**') }}
restore-keys: ${{ matrix.name }}-
- name: Install
run: |
sudo apt update
sudo apt install libgl-dev lcov
- name: Setup
run: |
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
- name: Coverage
run: bazel coverage --combined_report=lcov --config=gcc //...
- name: Summary
run: lcov --summary bazel-out/_coverage/_coverage_report.dat
- name: Upload
run: bash <(curl -s https://codecov.io/bash) -f bazel-out/_coverage/_coverage_report.dat
 
windows-msvc:
runs-on: windows-2022
@@ -106,43 +106,43 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Build
run: bazel build ///... --config debug
- name: Test
run: bazel test ///... --config debug
- name: Run
run: bazel run browser:tui --config debug
- run: bazel run refresh_compile_commands
- run: wc -l compile_commands.json && head -n 100 compile_commands.json
- uses: actions/checkout@v3
- name: Build
run: bazel build ///... --config debug
- name: Test
run: bazel test ///... --config debug
- name: Run
run: bazel run browser:tui --config debug
- run: bazel run refresh_compile_commands
- run: wc -l compile_commands.json && head -n 100 compile_commands.json
 
clang-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update && sudo apt-get install --no-install-recommends clang-format-14
- name: Format
run: find . -name *.h -o -name *.cpp | xargs clang-format-14 -style=file -i
- name: Check
run: git diff --exit-code
- uses: actions/checkout@v3
- run: sudo apt-get update && sudo apt-get install --no-install-recommends clang-format-14
- name: Format
run: find . -name *.h -o -name *.cpp | xargs clang-format-14 -style=file -i
- name: Check
run: git diff --exit-code
 
buildifier:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install
run: |
wget --output-document=buildifier https://github.com/bazelbuild/buildtools/releases/download/5.1.0/buildifier-linux-amd64
sudo chmod +x buildifier
- name: Check
run: ./buildifier --lint=warn --warnings=all -mode diff WORKSPACE $(find . -type f -iname "*.BUILD" -or -iname BUILD)
- uses: actions/checkout@v3
- name: Install
run: |
wget --output-document=buildifier https://github.com/bazelbuild/buildtools/releases/download/5.1.0/buildifier-linux-amd64
sudo chmod +x buildifier
- name: Check
run: ./buildifier --lint=warn --warnings=all -mode diff WORKSPACE $(find . -type f -iname "*.BUILD" -or -iname BUILD)
 
linux-compile-commands:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: CC=gcc-10 CXX=g++-10 bazel run refresh_compile_commands
- run: wc -l compile_commands.json && head -n 100 compile_commands.json
- uses: actions/checkout@v3
- run: CC=gcc-10 CXX=g++-10 bazel run refresh_compile_commands
- run: wc -l compile_commands.json && head -n 100 compile_commands.json
 
concurrency:
group: ${{ github.head_ref || github.run_id }}
 
README.md added: 211, removed: 131, total 80
@@ -17,7 +17,7 @@ of C++20 features, so a reasonably recent compiler is required.
[Bazelisk][bazelisk] as that will pick up the Bazel version to use from the
`.bazelversion` file in the repository root.
 
Per-developer configuration (e.g. compiler used and build type) is managed in
Per-developer configuration (e.g. compiler used and build type) is managed in
a gitignored `.bazelrc.local` file. To set this up for your environment, copy
`.bazelrc.local.example` to `.bazelrc.local` and edit to suit your compiler of
choice.
 
css/default.css added: 211, removed: 131, total 80
@@ -1,19 +1,99 @@
head {
display: none;
display: none;
}
 
a, abbr, acronym, audio, b, bdi, bdo, big, br, button, canvas, cite, code,
data, datalist, del, dfn, em, embed, i, iframe, img, input, ins, kbd, label,
map, mark, meter, noscript, object, output, picture, progress, q, ruby, s,
samp, script, select, slot, small, span, strong, sub, sup, svg, template,
textarea, time, u, tt, var, video, wbr {
display: inline;
a,
abbr,
acronym,
audio,
b,
bdi,
bdo,
big,
br,
button,
canvas,
cite,
code,
data,
datalist,
del,
dfn,
em,
embed,
i,
iframe,
img,
input,
ins,
kbd,
label,
map,
mark,
meter,
noscript,
object,
output,
picture,
progress,
q,
ruby,
s,
samp,
script,
select,
slot,
small,
span,
strong,
sub,
sup,
svg,
template,
textarea,
time,
u,
tt,
var,
video,
wbr {
display: inline;
}
 
address, article, aside, blockquote, details, dialog, dd, div, dl, dt,
fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header,
hgroup, hr, li, main, nav, ol, p, pre, section, table, ul {
display: block;
address,
article,
aside,
blockquote,
details,
dialog,
dd,
div,
dl,
dt,
fieldset,
figcaption,
figure,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
hgroup,
hr,
li,
main,
nav,
ol,
p,
pre,
section,
table,
ul {
display: block;
}
 
h1 {
@@ -33,7 +113,7 @@ h3 {
 
h4 {
display: block;
font-size: 1.00em;
font-size: 1em;
}
 
h5 {