Skip to content

Commit

Permalink
[FL-3863] toolchain: v37 (#3746)
Browse files Browse the repository at this point in the history
* toolchain: v36
* toolchain: fixed cert path; lib: nanopb: updated to 0.4.8
* fbtenv: rolled back cert path for 3.11
* clang-format: updated config for v18
* linter fixes
* clang-format: properly regenerated config (`clang-format -style=file:.clang-format -dump-config > .clang-format-new; mv .clang-format-new .clang-format`)
* clang-format: AllowShortLoopsOnASingleLine: false
* toolchain: v37
* fbt: compilation_db.py: fixes for Windows
  • Loading branch information
hedger authored Jul 5, 2024
1 parent 8c380eb commit 7879876
Show file tree
Hide file tree
Showing 43 changed files with 167 additions and 114 deletions.
120 changes: 87 additions & 33 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,55 @@ Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: false
AlignTrailingComments:
Kind: Never
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: true
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
Expand All @@ -27,17 +60,18 @@ AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
Expand All @@ -46,33 +80,29 @@ BraceWrapping:
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: false
ColumnLimit: 99
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: BinPack
BasedOnStyle: ''
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: false
ForEachMacros:
- foreach
Expand All @@ -97,19 +127,30 @@ IncludeCategories:
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
Expand All @@ -119,34 +160,44 @@ ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 10
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: Never
SortJavaStaticImport: Before
SortUsingDeclarations: false
SortUsingDeclarations: Never
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: Never
SpaceBeforeParensOptions:
AfterControlStatements: false
Expand All @@ -155,32 +206,35 @@ SpaceBeforeParensOptions:
AfterFunctionDeclarationName: false
AfterIfMacros: false
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInParens: Never
SpacesInParensOptions:
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: c++03
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
Expand Down
3 changes: 1 addition & 2 deletions applications/debug/bt_debug_app/views/bt_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ BtTestParam* bt_test_param_add(

void bt_test_set_rssi(BtTest* bt_test, float rssi) {
furi_assert(bt_test);
with_view_model(
bt_test->view, BtTestModel * model, { model->rssi = rssi; }, true);
with_view_model(bt_test->view, BtTestModel * model, { model->rssi = rssi; }, true);
}

void bt_test_set_packets_tx(BtTest* bt_test, uint32_t packets_num) {
Expand Down
3 changes: 1 addition & 2 deletions applications/debug/display_test/view_display_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ static void view_display_test_exit(void* context) {

static void view_display_test_timer_callback(void* context) {
ViewDisplayTest* instance = context;
with_view_model(
instance->view, ViewDisplayTestModel * model, { model->counter++; }, true);
with_view_model(instance->view, ViewDisplayTestModel * model, { model->counter++; }, true);
}

ViewDisplayTest* view_display_test_alloc(void) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,14 @@ bool lfrfid_debug_view_tune_is_dirty(LfRfidTuneView* tune_view) {

uint32_t lfrfid_debug_view_tune_get_arr(LfRfidTuneView* tune_view) {
uint32_t result = false;
with_view_model(
tune_view->view, LfRfidTuneViewModel * model, { result = model->ARR; }, false);
with_view_model(tune_view->view, LfRfidTuneViewModel * model, { result = model->ARR; }, false);

return result;
}

uint32_t lfrfid_debug_view_tune_get_ccr(LfRfidTuneView* tune_view) {
uint32_t result = false;
with_view_model(
tune_view->view, LfRfidTuneViewModel * model, { result = model->CCR; }, false);
with_view_model(tune_view->view, LfRfidTuneViewModel * model, { result = model->CCR; }, false);

return result;
}
Expand Down
3 changes: 1 addition & 2 deletions applications/debug/uart_echo/uart_echo.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ static int32_t uart_echo_worker(void* context) {
} while(length > 0);

notification_message(app->notification, &sequence_notification);
with_view_model(
app->view, UartDumpModel * model, { UNUSED(model); }, true);
with_view_model(app->view, UartDumpModel * model, { UNUSED(model); }, true);
}

if(events & WorkerEventRxIdle) {
Expand Down
6 changes: 4 additions & 2 deletions applications/debug/unit_tests/tests/furi_hal/furi_hal_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ MU_TEST(furi_hal_i2c_int_3b) {
DATA_SIZE - 1,
LP5562_I2C_TIMEOUT);
mu_assert(ret, "4 rx failed");
for(size_t i = 0; i < DATA_SIZE; i++) mu_assert(data_many[i] != 0, "4 invalid data_many");
for(size_t i = 0; i < DATA_SIZE; i++)
mu_assert(data_many[i] != 0, "4 invalid data_many");

ret = furi_hal_i2c_tx(
&furi_hal_i2c_handle_power, LP5562_ADDRESS, data_many, DATA_SIZE, LP5562_I2C_TIMEOUT);
Expand All @@ -90,7 +91,8 @@ MU_TEST(furi_hal_i2c_int_3b) {
DATA_SIZE - 1,
LP5562_I2C_TIMEOUT);
mu_assert(ret, "7 rx failed");
for(size_t i = 0; i < DATA_SIZE; i++) mu_assert(data_many[i] != 0, "7 invalid data_many");
for(size_t i = 0; i < DATA_SIZE; i++)
mu_assert(data_many[i] != 0, "7 invalid data_many");
}

MU_TEST(furi_hal_i2c_int_1b_fail) {
Expand Down
15 changes: 5 additions & 10 deletions applications/debug/unit_tests/tests/lfrfid/lfrfid_protocols.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

#define LF_RFID_READ_TIMING_MULTIPLIER 8

#define EM_TEST_DATA \
{ 0x58, 0x00, 0x85, 0x64, 0x02 }
#define EM_TEST_DATA {0x58, 0x00, 0x85, 0x64, 0x02}
#define EM_TEST_DATA_SIZE 5
#define EM_TEST_EMULATION_TIMINGS_COUNT (64 * 2)

Expand All @@ -21,8 +20,7 @@ const int8_t em_test_timings[EM_TEST_EMULATION_TIMINGS_COUNT] = {
-32, 32, 32, -32, -32, 32, -32, 32, -32, 32, -32, 32, -32, 32,
};

#define HID10301_TEST_DATA \
{ 0x8D, 0x48, 0xA8 }
#define HID10301_TEST_DATA {0x8D, 0x48, 0xA8}
#define HID10301_TEST_DATA_SIZE 3
#define HID10301_TEST_EMULATION_TIMINGS_COUNT (541 * 2)

Expand Down Expand Up @@ -71,8 +69,7 @@ const int8_t hid10301_test_timings[HID10301_TEST_EMULATION_TIMINGS_COUNT] = {
5, -5, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4,
};

#define IOPROX_XSF_TEST_DATA \
{ 0x65, 0x01, 0x05, 0x39 }
#define IOPROX_XSF_TEST_DATA {0x65, 0x01, 0x05, 0x39}
#define IOPROX_XSF_TEST_DATA_SIZE 4
#define IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT (468 * 2)

Expand Down Expand Up @@ -116,8 +113,7 @@ const int8_t ioprox_xsf_test_timings[IOPROX_XSF_TEST_EMULATION_TIMINGS_COUNT] =
};

#define INDALA26_EMULATION_TIMINGS_COUNT (1024 * 2)
#define INDALA26_TEST_DATA \
{ 0x3B, 0x73, 0x64, 0xA8 }
#define INDALA26_TEST_DATA {0x3B, 0x73, 0x64, 0xA8}
#define INDALA26_TEST_DATA_SIZE 4

const int8_t indala26_test_timings[INDALA26_EMULATION_TIMINGS_COUNT] = {
Expand Down Expand Up @@ -209,8 +205,7 @@ const int8_t indala26_test_timings[INDALA26_EMULATION_TIMINGS_COUNT] = {
-1, 1, -1, 1, -1, 1, -1, 1,
};

#define FDXB_TEST_DATA \
{ 0x44, 0x88, 0x23, 0xF2, 0x5A, 0x6F, 0x00, 0x01, 0x00, 0x00, 0x00 }
#define FDXB_TEST_DATA {0x44, 0x88, 0x23, 0xF2, 0x5A, 0x6F, 0x00, 0x01, 0x00, 0x00, 0x00}
#define FDXB_TEST_DATA_SIZE 11
#define FDXB_TEST_EMULATION_TIMINGS_COUNT (206)

Expand Down
3 changes: 1 addition & 2 deletions applications/main/u2f/views/u2f_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,5 @@ void u2f_view_set_ok_callback(U2fView* u2f, U2fOkCallback callback, void* contex
}

void u2f_view_set_state(U2fView* u2f, U2fViewMsg msg) {
with_view_model(
u2f->view, U2fModel * model, { model->display_msg = msg; }, true);
with_view_model(u2f->view, U2fModel * model, { model->display_msg = msg; }, true);
}
3 changes: 2 additions & 1 deletion applications/services/cli/cli_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ void cli_command_help(Cli* cli, FuriString* args, void* context) {
CliCommandTree_it(it_left, cli->commands);
CliCommandTree_it_t it_right;
CliCommandTree_it(it_right, cli->commands);
for(size_t i = 0; i < commands_count_mid; i++) CliCommandTree_next(it_right);
for(size_t i = 0; i < commands_count_mid; i++)
CliCommandTree_next(it_right);

// Iterate throw tree
for(size_t i = 0; i < commands_count_mid; i++) {
Expand Down
3 changes: 1 addition & 2 deletions applications/services/gui/modules/button_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ void button_menu_reset(ButtonMenu* button_menu) {
void button_menu_set_header(ButtonMenu* button_menu, const char* header) {
furi_check(button_menu);

with_view_model(
button_menu->view, ButtonMenuModel * model, { model->header = header; }, true);
with_view_model(button_menu->view, ButtonMenuModel * model, { model->header = header; }, true);
}

ButtonMenuItem* button_menu_add_item(
Expand Down
Loading

0 comments on commit 7879876

Please sign in to comment.