diff options
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/.clang-format | 82 | ||||
| -rw-r--r-- | etc/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | etc/CONTRIBUTING.md | 17 | ||||
| -rw-r--r-- | etc/nsxiv.1 | 12 | ||||
| -rw-r--r-- | etc/woodpecker/clang-tidy-checks | 1 |
5 files changed, 107 insertions, 7 deletions
diff --git a/etc/.clang-format b/etc/.clang-format new file mode 100644 index 0000000..a29be62 --- /dev/null +++ b/etc/.clang-format @@ -0,0 +1,82 @@ +# clang-format doesn't dictate the project's code style and can mess up a +# couple edge cases. However it comes quite close and can be used for fixing +# most style issues automatically on new changes via `git-clang-format`. +--- + +Standard: c++03 + +ColumnLimit: 0 + +AccessModifierOffset: -8 +ConstructorInitializerIndentWidth: 8 +ContinuationIndentWidth: 8 +IndentCaseLabels: false +IndentGotoLabels: false +IndentPPDirectives: None +IndentWidth: 8 +IndentWrappedFunctionNames: false +NamespaceIndentation: None +TabWidth: 8 +UseTab: AlignWithSpaces + +AlignAfterOpenBracket: true +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: false +AlignOperands: true +AlignTrailingComments: false +DerivePointerAlignment: true +PointerAlignment: true + +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false + +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false + +BinPackArguments: true +BinPackParameters: true + +BreakBeforeBraces: Custom +BraceWrapping: + AfterControlStatement: MultiLine + AfterEnum: false + AfterExternBlock: false + AfterFunction: true + AfterStruct: false + AfterUnion: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: true + +BreakBeforeBinaryOperators: None +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: false +BreakConstructorInitializers: BeforeComma +BreakConstructorInitializersBeforeComma: false +BreakStringLiterals: true + +Cpp11BracedListStyle: false +MaxEmptyLinesToKeep: 1 + +ReflowComments: false + +SortIncludes: true + +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false + +... diff --git a/etc/CHANGELOG.md b/etc/CHANGELOG.md index aefb36f..5ea1259 100644 --- a/etc/CHANGELOG.md +++ b/etc/CHANGELOG.md @@ -116,7 +116,7 @@ references *above* can be found on the new main nsxiv repository on CodeBerg. * Changes: - * Window title is now customizeable via `win-title`, cli flag `-T` and related + * Window title is now customizable via `win-title`, cli flag `-T` and related config.h options are removed. See `WINDOW TITLE` section of the manpage for more info. [#213] * Imlib2 cache size is now set based on total memory percentage, by default diff --git a/etc/CONTRIBUTING.md b/etc/CONTRIBUTING.md index 8d9680f..aa96068 100644 --- a/etc/CONTRIBUTING.md +++ b/etc/CONTRIBUTING.md @@ -23,7 +23,7 @@ Contribution Guideline When contributing, make sure: * Your contribution falls under nsxiv's scope and aim - * You follow the existing code style (see [.editorconfig](../.editorconfig)) + * You follow the existing code style (see the "Code Style" section below) * You open the pull request from a new branch, not from master * To avoid using force pushes, especially for bigger patches. Only use them when there's merge conflicts. @@ -44,6 +44,21 @@ to work on. You can also filter the issues via label: (Intermediate/Experienced) Issues where we require some help. +Code Style +---------- + +`nsxiv` mostly follows the [suckless code-style][sl], with a few exceptions. +If your editor supports [.editorconfig](../.editorconfig) then you'll already be +off to a good start without needing much manual intervention. Additionally we +provide a [clang-format](./.clang-format) configuration for reference, which you +may use via [`git-clang-format`][cf] to format the changes you've made (please +do not run it globally on the entire code-base since clang-format gets a decent +amount of edge cases wrong). + +[sl]: https://suckless.org/coding_style/ +[cf]: https://clang.llvm.org/docs/ClangFormat.html#git-integration + + Development workflow for maintainers ------------------------------------ diff --git a/etc/nsxiv.1 b/etc/nsxiv.1 index d601e5c..e2fb4c8 100644 --- a/etc/nsxiv.1 +++ b/etc/nsxiv.1 @@ -135,6 +135,10 @@ Prefix the next command with a number (denoted via .B q Quit nsxiv. .TP +.B Q +Quit nsxiv, but additionally print the current filename when \-o is active and +no files have been marked. +.TP .B Return Switch to thumbnail mode / open selected image in image mode. .TP @@ -457,6 +461,9 @@ Color of the bar foreground. Defaults to window.foreground Color of the mark foreground. Defaults to window.foreground .TP Please see xrdb(1) on how to change them. +.LP +An X resources entry with an empty value means the default +(defined in config.h) will be used. .SH WINDOW TITLE The window title can be replaced with the output of a user-provided script, which is called by nsxiv whenever any of the relevant information changes. @@ -562,11 +569,6 @@ TAAPArthur <taaparthur at gmail.com> eylles <ed.ylles1997 at gmail.com> Stein Gunnar Bakkeby <bakkeby at gmail.com> explosion-mental <explosion0mental at gmail.com> -mamg22 <marcomonizg at gmail.com> -LuXu -Guilherme Freire -Sam Whitehead -Kian Kasad <kian at kasad.com> .EE .SH CONTRIBUTORS .EX diff --git a/etc/woodpecker/clang-tidy-checks b/etc/woodpecker/clang-tidy-checks index 0cc2693..edf0ba6 100644 --- a/etc/woodpecker/clang-tidy-checks +++ b/etc/woodpecker/clang-tidy-checks @@ -9,6 +9,7 @@ misc-*,android-cloexec-*,llvm-include-order -bugprone-implicit-widening-of-multiplication-result,-bugprone-integer-division -android-cloexec-fopen,-android-cloexec-pipe,-cert-err33-c -bugprone-assignment-in-if-condition +-bugprone-suspicious-realloc-usage # false positive warnings -clang-analyzer-valist.Uninitialized |
