Skip to content

Commit 0c46b2e

Browse files
Fixing restyled to ignore third_party (project-chip#392)
Note: Anush verbally approved to this, but was not at a computer, merging this in now so we can have restyled work properly for @turon * Trying this better exclude path * Trying to add spaces to test * Next shot * Trying ordering... * Fixing restyled config (sigh, naming) * Testing this restyle config * Complains about prettier json * Switching to jq, for some reason the CLI picks up prettier json, but not the live version * Trying this... * Turning on auto... * Auto won't work for us, fork'd PRs dont' provide push for apps * Restyled by prettier-markdown * Adding default formatters Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 1d24a7b commit 0c46b2e

File tree

6 files changed

+127
-67
lines changed

6 files changed

+127
-67
lines changed

.devcontainer/devcontainer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"yzhang.markdown-all-in-one",
1717
"eamodio.gitlens",
1818
"yuichinukiyama.vscode-preview-server",
19-
"aaron-bond.better-comments"
19+
"aaron-bond.better-comments",
20+
"foxundermoon.shell-format"
2021
],
2122
// Use 'settings' to set *default* container specific settings.json values on container create.
2223
// You can edit these settings after create using File > Preferences > Settings > Remote.

.restyled.yaml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Do anything at all
2+
enabled: true
3+
4+
# Push the style fixes directly to the original PR
5+
auto: false
6+
7+
# Open Restyle PRs?
8+
pull_requests: true
9+
10+
# Add labels to any created Restyle PRs
11+
labels:
12+
- restyled
13+
14+
# Labels to ignore
15+
ignore_labels:
16+
- restyled-ignore
17+
18+
# Leave comments on the original PR linking to the Restyle PR?
19+
comments: false
20+
21+
# Request review on the Restyle PR
22+
request_review: none
23+
24+
# Patterns to exclude from all Restylers
25+
exclude:
26+
- ".github/workflows/**/*" # https://github.com/restyled-io/restyler/issues/73
27+
- "third_party/**/*"
28+
- "third_party/**"
29+
- "third_party/*"
30+
- "build/**/*"
31+
- "autom4te.cache/**/*"
32+
33+
# Restylers to run, and how
34+
restylers:
35+
- name: clang-format
36+
enabled: true
37+
image: restyled/restyler-clang-format:v9.0.0
38+
command:
39+
- clang-format
40+
- "-i"
41+
arguments: []
42+
include:
43+
- "**/*.c"
44+
- "**/*.cc"
45+
- "**/*.cpp"
46+
- "**/*.cxx"
47+
- "**/*.c++"
48+
- "**/*.C"
49+
- "**/*.cs"
50+
- "**/*.h"
51+
- "**/*.hh"
52+
- "**/*.hpp"
53+
- "**/*.hxx"
54+
- "**/*.h++"
55+
- "**/*.H"
56+
- "**/*.java"
57+
- "**/*.js"
58+
- "**/*.m"
59+
interpreters: []
60+
- name: jq
61+
enabled: true
62+
include:
63+
- "**/*.json"
64+
- name: prettier-markdown
65+
enabled: true
66+
include:
67+
- "**/*.md"
68+
- "**/*.markdown"
69+
- name: prettier-yaml
70+
enabled: true
71+
include:
72+
- "**/*.yml"
73+
- "**/*.yaml"
74+
- name: shellharden
75+
enabled: true
76+
include:
77+
- "**/*.sh"
78+
- "**/*.bash"
79+
- name: shfmt
80+
enabled: true
81+
include:
82+
- "**/*.sh"
83+
- "**/*.bash"

.restyled.yml

-28
This file was deleted.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"[cpp]": {
2020
"editor.defaultFormatter": "xaver.clang-format"
2121
},
22+
"[dockerfile]": {
23+
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
24+
},
2225
"files.associations": {
2326
"iostream": "cpp",
2427
"array": "cpp",

docs/PROJECT_FLOW.md

+38-37
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
11
## CHIP Project Flow
22

3-
This section is intended to cover how CHIP uses GitHub Projects,
4-
Issues, Milestones, Releases, and Branches for program/project
5-
management in the code repository.
3+
This section is intended to cover how CHIP uses GitHub Projects, Issues,
4+
Milestones, Releases, and Branches for program/project management in the code
5+
repository.
66

77
### Issues
88

9-
CHIP uses issues as simple problem descriptions or feature requests. In
10-
general, all work contributed to the repository in the form of pull requests
11-
(PR) should be under the auspices of some open issue. This may seem onerous and
12-
in some cases duplicative, so consider these guidelines when deciding whether to
13-
you can get away with not creating an issue:
14-
15-
* Trivial fixes: issues can function as TODO lists, simple reminders that
16-
something should be addressed. Sometimes, though, the work required to
17-
fix is smaller than the work required to write the issue.
18-
* Issues intended to be addressed by a PR may not actually be fixed or
19-
may regress.
20-
* Issues can span PRs (as PRs should be as small as possible, but no smaller).
21-
* Issues help form an important basis for release notes. Any PR that addresses
22-
a problem that should have release visibility, please do open an issue.
9+
CHIP uses issues as simple problem descriptions or feature requests. In general,
10+
all work contributed to the repository in the form of pull requests (PR) should
11+
be under the auspices of some open issue. This may seem onerous and in some
12+
cases duplicative, so consider these guidelines when deciding whether to you can
13+
get away with not creating an issue:
14+
15+
- Trivial fixes: issues can function as TODO lists, simple reminders that
16+
something should be addressed. Sometimes, though, the work required to fix is
17+
smaller than the work required to write the issue.
18+
- Issues intended to be addressed by a PR may not actually be fixed or may
19+
regress.
20+
- Issues can span PRs (as PRs should be as small as possible, but no smaller).
21+
- Issues help form an important basis for release notes. Any PR that addresses a
22+
problem that should have release visibility, please do open an issue.
2323

2424
### Pull requests
2525

2626
Pull requests should be small and address a single, specific change to the code
27-
base. They should be easy to review, as a "yes, that's better". Refrain from
27+
base. They should be easy to review, as a "yes, that's better". Refrain from
2828
requesting review until all PR checks have completed successfully, lest you tire
2929
your reviewers.
3030

3131
PR Don'ts:
32-
* Don't combine unrelated changes. E.g. if the PR addresses a bug in some
33-
C code, an update to the top-level .gitignore doesn't belong.
34-
* Don't make stacks. E.g. if a change in a component requires a new feature
35-
or even a small tweak in one or more of its dependencies, each dependency
36-
change belongs in its own separate PR.
3732

33+
- Don't combine unrelated changes. E.g. if the PR addresses a bug in some C
34+
code, an update to the top-level .gitignore doesn't belong.
35+
- Don't make stacks. E.g. if a change in a component requires a new feature or
36+
even a small tweak in one or more of its dependencies, each dependency change
37+
belongs in its own separate PR.
3838

3939
### Milestones
4040

4141
In CHIP parlance, a milestone is simply an expected due date or release.
4242

43-
Date-based milestones start with an "M" and have the form M3, M3.2, M4,
44-
etc. corresponding to the number of months since January 1, 2020, and generally
45-
mean the last Friday of that month. E.g. M1 corresponds to EOB January 24,
46-
2020. The Morrow milestone is a special milestone that means "unprioritized" or
47-
"unscheduled" or "unscoped".
43+
Date-based milestones start with an "M" and have the form M3, M3.2, M4, etc.
44+
corresponding to the number of months since January 1, 2020, and generally mean
45+
the last Friday of that month. E.g. M1 corresponds to EOB January 24,
46+
47+
2020. The Morrow milestone is a special milestone that means "unprioritized" or
48+
"unscheduled" or "unscoped".
4849

4950
The form of the names of release-based milestone names are TBD, and may have
5051
flexible or changing dates.
@@ -53,20 +54,20 @@ flexible or changing dates.
5354

5455
Projects are collections of issues, pull requests, and notes intended to capture
5556
larger efforts that don't fit in issues, have multiple-subsystems involved, or
56-
may span multiple milestones. We use projects 2 ways:
57+
may span multiple milestones. We use projects 2 ways:
5758

58-
1. To track burn down on a larger task. When constructing such a project, it's
59-
important to think in terms of something that will eventually have
60-
an end, i.e. a definite scope.
59+
1. To track burn down on a larger task. When constructing such a project, it's
60+
important to think in terms of something that will eventually have an end,
61+
i.e. a definite scope.
6162
2. To categorize issues, denote broader efforts without a definite time scope.
62-
These projects might reflect or show burndown or percent complete, but are mostly
63-
used to view where effort is going.
63+
These projects might reflect or show burndown or percent complete, but are
64+
mostly used to view where effort is going.
6465

6566
Issues can belong to any number of projects, but should generally only belong to
6667
one of the task-tracking projects (the first type).
6768

6869
### Branches, releases, and general development flow
6970

70-
Master should always be CHIPs best branch. Release branches, once cut, are
71-
closed for any feature work. Software fixes for release branches must first
72-
land on master unless demonstrably infeasible.
71+
Master should always be CHIPs best branch. Release branches, once cut, are
72+
closed for any feature work. Software fixes for release branches must first land
73+
on master unless demonstrably infeasible.

third_party/nlbuild-autotools/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See "Getting Started" in repo/README.md.
1313

1414
### Subsequent Update
1515

16-
Assuming the project copy of nlbuild-autotools was created with git
16+
Assuming the project copy of nlbuild-autotools was created with git
1717
subtree, a subsequent update can be accomplished with the following,
1818
replacing HEAD with a named, tagged version if the HEAD commit is not
1919
what is desired.

0 commit comments

Comments
 (0)