Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra: Update wokflows and precommit configuration from the template #60

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 48 additions & 37 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
---
BasedOnStyle: LLVM
AlignConsecutiveMacros: AcrossComments
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
Expand All @@ -24,58 +24,69 @@ AttributeMacros:
- __packed
- __printf_like
- __syscall
- __syscall_always_inline
- __subsystem
BitFieldColonSpacing: After
BreakBeforeBraces: Linux
ColumnLimit: 100
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
ForEachMacros:
- 'FOR_EACH'
- 'FOR_EACH_FIXED_ARG'
- 'FOR_EACH_IDX'
- 'FOR_EACH_IDX_FIXED_ARG'
- 'FOR_EACH_NONEMPTY_TERM'
- 'RB_FOR_EACH'
- 'RB_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_DLIST_FOR_EACH_NODE'
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SFLIST_FOR_EACH_NODE'
- 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SLIST_FOR_EACH_CONTAINER'
- 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SLIST_FOR_EACH_NODE'
- 'SYS_SLIST_FOR_EACH_NODE_SAFE'
- '_WAIT_Q_FOR_EACH'
- 'Z_FOR_EACH'
- 'Z_FOR_EACH_ENGINE'
- 'Z_FOR_EACH_EXEC'
- 'Z_FOR_EACH_FIXED_ARG'
- 'Z_FOR_EACH_FIXED_ARG_EXEC'
- 'Z_FOR_EACH_IDX'
- 'Z_FOR_EACH_IDX_EXEC'
- 'Z_FOR_EACH_IDX_FIXED_ARG'
- 'Z_FOR_EACH_IDX_FIXED_ARG_EXEC'
- 'Z_GENLIST_FOR_EACH_CONTAINER'
- 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
- 'Z_GENLIST_FOR_EACH_NODE'
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
- "FOR_EACH"
- "FOR_EACH_FIXED_ARG"
- "FOR_EACH_IDX"
- "FOR_EACH_IDX_FIXED_ARG"
- "FOR_EACH_NONEMPTY_TERM"
- "RB_FOR_EACH"
- "RB_FOR_EACH_CONTAINER"
- "SYS_DLIST_FOR_EACH_CONTAINER"
- "SYS_DLIST_FOR_EACH_CONTAINER_SAFE"
- "SYS_DLIST_FOR_EACH_NODE"
- "SYS_DLIST_FOR_EACH_NODE_SAFE"
- "SYS_SFLIST_FOR_EACH_CONTAINER"
- "SYS_SFLIST_FOR_EACH_CONTAINER_SAFE"
- "SYS_SFLIST_FOR_EACH_NODE"
- "SYS_SFLIST_FOR_EACH_NODE_SAFE"
- "SYS_SLIST_FOR_EACH_CONTAINER"
- "SYS_SLIST_FOR_EACH_CONTAINER_SAFE"
- "SYS_SLIST_FOR_EACH_NODE"
- "SYS_SLIST_FOR_EACH_NODE_SAFE"
- "_WAIT_Q_FOR_EACH"
- "Z_FOR_EACH"
- "Z_FOR_EACH_ENGINE"
- "Z_FOR_EACH_EXEC"
- "Z_FOR_EACH_FIXED_ARG"
- "Z_FOR_EACH_FIXED_ARG_EXEC"
- "Z_FOR_EACH_IDX"
- "Z_FOR_EACH_IDX_EXEC"
- "Z_FOR_EACH_IDX_FIXED_ARG"
- "Z_FOR_EACH_IDX_FIXED_ARG_EXEC"
- "Z_GENLIST_FOR_EACH_CONTAINER"
- "Z_GENLIST_FOR_EACH_CONTAINER_SAFE"
- "Z_GENLIST_FOR_EACH_NODE"
- "Z_GENLIST_FOR_EACH_NODE_SAFE"
- "STRUCT_SECTION_FOREACH"
- "TYPE_SECTION_FOREACH"
IfMacros:
- "CHECKIF"
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520
#IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^".*\.h"$'
Priority: 0
- Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|stdarg|stdbool|stddef|stdint|stdio|stdlib|string|tgmath|time|wchar|wctype)\.h>$'
Priority: 1
- Regex: '^\<zephyr/.*\.h\>$'
Priority: 2
- Regex: '.*'
- Regex: ".*"
Priority: 3
IndentCaseLabels: false
IndentWidth: 8
# SpaceBeforeParens: ControlStatementsExceptControlMacros # clang-format >= 13.0
UseTab: Always
InsertBraces: true
SpaceBeforeParens: ControlStatementsExceptControlMacros
# Enable sorting of includes, since we do not have cyclical dependencies (unlike Zephyr)
SortIncludes: true
UseTab: ForContinuationAndIndentation
WhitespaceSensitiveMacros:
- STRINGIFY
- Z_STRINGIFY
48 changes: 48 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Checks: |
*
-altera-*
-android-*
-abseil-*
-cppcoreguidelines-*
-hicpp-*
-modernize-*
-llvmlibc-restrict-system-libc-headers
-readability-identifier-length
-readability-function-size
-readability-magic-numbers
-google-readability-function-size
-bugprone-easily-swappable-parameters
-llvm-include-order
-misc-redundant-expression

WarningsAsErrors: ""
HeaderFilterRegex: "-zephyr.h,-logging/log.h"
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- key: readability-function-cognitive-complexity.IgnoreMacros
value: True
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.StructCase
value: lower_case
- key: readability-identifier-naming.ClassCase
value: lower_case
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.EnumCase
value: lower_case
- key: readability-identifier-naming.EnumConstant
value: Camel_Snake_Case
- key: readability-identifier-naming.GlobalConstantCase
value: lower_case
- key: readability-identifier-naming.StaticConstantCase
value: lower_case
- key: readability-identifier-naming.StaticConstantPrefix
value: "prv_"
- key: readability-identifier-naming.GlobalVariableCase
value: lower_case
- key: readability-identifier-naming.GlobalVariablePrefix
value: "prv_"
2 changes: 1 addition & 1 deletion .clangd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CompileFlags:
Remove: [-fno-reorder-functions, -fno-freestanding, -mfp16-format=ieee]
Remove: [-fno-reorder-functions, -fno-freestanding, -fno-printf-return-value, -mfp16-format=ieee]
2 changes: 2 additions & 0 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
markup:
enable_markup: false
35 changes: 21 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
---
name: Bug report
about: Create a report on what is not working but it should
about: Create a report about something not working
title: BUG - <subject title related to the issue>
labels: 'type: bug'
assignees: ''

labels: "type: bug"
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.
#### Describe the bug

<!-- A clear and concise description of what the bug is. -->

#### Firmware/software version

<!-- Version where the bug appears. -->

#### Hardware version

<!-- Hardware version where the bug appears, if relevant. -->

#### Steps to reproduce

**Firmware/Software Version**
<!-- Steps to reproduce the behaviour: -->

**Hardware Version**
<!-- 1. Go to '...' -->
<!-- 2. Click on '....' -->

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
#### Additional context

**Additional context**
Add any other context about the problem here.
<!-- Add any other context about the problem here. -->
19 changes: 12 additions & 7 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
---
name: Feature request
about: Normal development issue on technical matters
about: Development issue describing something new to be added to the project
title: "<subject title related to the issue>"
labels: 'type: feature request'
assignees: ''

labels: "type: feature request"
assignees: ""
---

## Context

<!--- Provide some context why is this feature needed.
Does it build from an existing feature, does it enable an implementation of some other new feature? -->
Does it build from an existing feature, does it enable an implementation of some
other new feature? -->

## Required steps / Implementation details

<!--- Either provide a list of steps that are required for this feature and/or provide technical details on how this feature will be implemented. -->
<!--- Either provide a list of steps that are required for this feature and/or
provide technical details on how this feature will be implemented. -->

## Definition of Done

<!--- Explicitly define conditions when this feature request is considered done, so it can be reviewed and validated. -->
<!--- Explicitly define conditions when this feature request is considered done,
so it can be reviewed and validated. -->

<!-- For example: Described feature is implemented, documented, tested and
reviewed. -->
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/requirement.md

This file was deleted.

4 changes: 4 additions & 0 deletions .github/pr-labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add labels (on the left) to the PRs of specific branches (on the right)
pull request: feature/*
release: release/*
fix: fix/*
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## Description
# Description

<!--- A summary of the changes that this PR introduces. Provide a relevant motivation and context about this PR or link an issue that provides it. -->
<!--- A summary of the changes that this PR introduces. Provide a relevant
motivation and context about this PR or link an issue that provides it. -->

Closes #

Related #

## Areas of interest for the reviewer
Expand All @@ -11,21 +13,24 @@ Related #

## Checklist

<!--- Check items that you fulfilled, strikeout the ones that do not apply and write why -->
<!--- Check items that you fulfilled, strikeout the ones that do not apply and
write why -->

- [ ] My code follows the [style guidelines] as defined by IRNAS.
- [ ] I have performed a self-review of my code.
- [ ] My changes generate no new warnings.
- [ ] I added/updated source code documentation for all newly added or changed functions.
- [ ] I updated the CHANGELOG.
- [ ] I updated all customer-facing technical documentation.

Example strikeout:
~~- [ ] I updated all customer-facing technical documentation.~~ - This PR introduced only internal facing changes.
Example strikeout: - [x] ~~I updated all customer-facing technical documentation.~~ - This PR
introduced only internal facing changes.

## After-review steps

<!--- Delete section or select one option -->
* Reviewer can merge and delete the branch.
* I will merge PR by myself.

[style guidelines]: https://github.com/IRNAS/irnas-guidelines-docs/blob/dev/docs/developer_guidelines.md
- Reviewer can merge and delete the branch.
- I will merge PR by myself.

[style guidelines]:
https://github.com/IRNAS/irnas-guidelines-docs/blob/main/docs/developer_guidelines.md
Loading
Loading