mirror of
https://github.com/logos-blockchain/logos-blockchain-ui.git
synced 2026-07-08 00:39:28 +00:00
Add shorthands to justfile for code linting and formatting.
This commit is contained in:
parent
799aa40bb6
commit
3bfcc96998
28
.clang-format
Normal file
28
.clang-format
Normal file
@ -0,0 +1,28 @@
|
||||
BasedOnStyle: LLVM
|
||||
|
||||
IndentWidth: 4
|
||||
ColumnLimit: 120
|
||||
|
||||
IndentAccessModifiers: false
|
||||
AccessModifierOffset: -4
|
||||
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
BinPackParameters: false
|
||||
BinPackArguments: false
|
||||
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
|
||||
PointerAlignment: Left
|
||||
ReferenceAlignment: Left
|
||||
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
|
||||
BreakAfterReturnType: None
|
||||
PenaltyReturnTypeOnItsOwnLine: 1000
|
||||
|
||||
BreakTemplateDeclarations: Yes
|
||||
|
||||
NamespaceIndentation: All
|
||||
24
justfile
24
justfile
@ -28,8 +28,12 @@ clean *args:
|
||||
fi
|
||||
}
|
||||
|
||||
if pgrep -x logos > /dev/null; then
|
||||
confirm "Kill 'logos' process?" && pkill logos
|
||||
logos_procs="$(pgrep -ax logos_host_qt || true)"
|
||||
if [ -n "$logos_procs" ]; then
|
||||
echo "Found matching processes:"
|
||||
echo "$logos_procs"
|
||||
echo "This will kill the process(es) above."
|
||||
confirm "Proceed?" && { pkill -x logos_host_qt; echo "Killed."; }
|
||||
else
|
||||
echo "Already killed"
|
||||
fi
|
||||
@ -50,3 +54,19 @@ clean *args:
|
||||
|
||||
run: (clean "-y")
|
||||
nix run
|
||||
|
||||
# Launch CLion inside the Nix dev shell so it inherits required variables and fully integrates with Nix.
|
||||
clion:
|
||||
nix develop -c "$HOME/.local/share/JetBrains/Toolbox/apps/clion/bin/clion.sh" . >/dev/null 2>&1 &
|
||||
|
||||
prettify:
|
||||
nix shell nixpkgs#clang-tools -c clang-format -i src/**.cpp src/**.h
|
||||
|
||||
# Reuses cmake-build-debug's compile_commands.json (generated by CLion) instead
|
||||
# of a `configure` step — this repo has no standalone `build` recipe.
|
||||
lint:
|
||||
nix shell nixpkgs#clang-tools --command clang-tidy \
|
||||
-p cmake-build-debug \
|
||||
--header-filter='src/.*' \
|
||||
--extra-arg-before=--driver-mode=g++ \
|
||||
src/BlockchainPlugin.cpp src/BlockchainBackend.cpp src/AccountsModel.cpp src/LogModel.cpp
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user