bodge: shut linter

This commit is contained in:
2026-01-16 00:51:05 +01:00
parent e5c3c619c3
commit 5749263605
4 changed files with 18 additions and 10 deletions

View File

@@ -1,3 +1,6 @@
// TODO: rewrite properly
// NOLINTBEGIN(clang-diagnostic-nullability-completeness)
#ifndef DESKTOP_EXEC_H_
#define DESKTOP_EXEC_H_
@@ -8,3 +11,4 @@ int parse_exec_string(const char* exec_s, int* arg_count, char*** args);
void free_parsed_args(int arg_count, char** args);
#endif
// NOLINTEND(clang-diagnostic-nullability-completeness)

View File

@@ -7,25 +7,25 @@
#endif
// Do we just replace the compiler with clang??
#if defined(__clang__)
#ifdef __clang__
#define NULLABLE _Nullable
#else
#define NULLABLE
#endif
#if defined(__clang__)
#ifdef __clang__
#define NNULLABLE _Nonnull
#else
#define NNULLABLE
#endif
#if defined(__clang__)
#ifdef __clang__
#define UNULLABLE _Null_unspecified
#else
#define UNULLABLE
#endif
#if defined(__clang__)
#ifdef __clang__
#define COMPILER_VERSION __VERSION__
#elif defined(__GNUC__)
#define xstr(s) str(s)

View File

@@ -1,3 +1,5 @@
// TODO: rewrite properly
// NOLINTBEGIN(clang-diagnostic-nullability-completeness)
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@@ -133,6 +135,7 @@ int push_arg(struct ctx* st) {
3 = syntax
Important: call free_parsed_args afterwards to free the passed ***args
*/
// NOLINTBEGIN(readability-function-cognitive-complexity)
int parse_exec_string(const char* exec_s, int* arg_count, char*** args) {
if (!exec_s || !args || !arg_count) return 1;
@@ -226,3 +229,4 @@ syntax_err:
return 3;
}
// NOLINTEND(readability-function-cognitive-complexity)
// NOLINTEND(clang-diagnostic-nullability-completeness)

View File

@@ -193,8 +193,8 @@ void scratch_print_ui() {
.y = ((window.ws_row - BOX_HEIGHT) / 2), // leave more space under
};
if (window.ws_row < BOX_HEIGHT + INNER_BOX_OUT_MARGIN * 2 ||
window.ws_col < BOX_WIDTH + INNER_BOX_OUT_MARGIN * 2) {
if (window.ws_row < BOX_HEIGHT + (INNER_BOX_OUT_MARGIN * 2) ||
window.ws_col < BOX_WIDTH + (INNER_BOX_OUT_MARGIN * 2)) {
printf("\033[2J\033[H"); // Clear screen
printf("\x1b[1;31mScreen too small\x1b[0m\n");
printf("\x1b[%s;%sm\x1b[2J", g_config->colors.bg, g_config->colors.fg);
@@ -537,7 +537,7 @@ static void print_footer() {
utf8len(g_config->strings.f_refresh) +
utf8len(KEY_NAMES[g_config->functions.refresh]);
bsize += 2 * 2 + 3 * 1;
bsize += (2 * 2) + (3 * 1);
if (fido_enabled) {
bsize += utf8len(g_config->strings.f_fido) +