Skip to content

Commit 20ab6dc

Browse files
committed
Rename .styleguide configs to .wpiformat to match tool name
1 parent 6694a03 commit 20ab6dc

File tree

12 files changed

+27
-27
lines changed

12 files changed

+27
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
rm -rf branch-test
9494
mkdir branch-test && cd branch-test && git init
9595
git checkout -b master
96-
touch .styleguide
97-
git add .styleguide && git commit -q -m "Initial commit"
96+
touch .wpiformat
97+
git add .wpiformat && git commit -q -m "Initial commit"
9898
wpiformat
9999
100100
# Verify wpiformat reports success if "main" exists
@@ -104,8 +104,8 @@ jobs:
104104
rm -rf branch-test
105105
mkdir branch-test && cd branch-test && git init
106106
git checkout -b main
107-
touch .styleguide
108-
git add .styleguide && git commit -q -m "Initial commit"
107+
touch .wpiformat
108+
git add .wpiformat && git commit -q -m "Initial commit"
109109
wpiformat
110110
111111
- name: Delete branch-test folder

.styleguide renamed to .wpiformat

File renamed without changes.
File renamed without changes.

wpiformat/README.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ On Linux/OSX, execute::
2222
Project Setup
2323
*************
2424

25-
To use these tools with a new project, copy `.styleguide`_, and `.styleguide-license`_ from the examples folder into the project and create a new ``.clang-format`` file based on the desired C/C++ style.
25+
To use these tools with a new project, copy `.wpiformat`_, and `.wpiformat-license`_ from the examples folder into the project and create a new ``.clang-format`` file based on the desired C/C++ style.
2626

2727
Note: Since wpiformat already handles include ordering, it is recommended to use ``SortIncludes: false`` in ``.clang-format``.
2828

29-
.styleguide
30-
-----------
29+
.wpiformat
30+
----------
3131

32-
wpiformat checks the current directory for the ``.styleguide`` file. If one doesn't exist, all parent directories are tried as well. See the ``.styleguide`` file in the docs/examples directory for all possible groups.
32+
wpiformat checks the current directory for the ``.wpiformat`` file. If one doesn't exist, all parent directories are tried as well. See the ``.wpiformat`` file in the docs/examples directory for all possible groups.
3333

3434
This file contains groups of file name regular expressions. There are two groups of regexes which prevent tasks (i.e., formatters and linters) from running on matching files:
3535

@@ -54,12 +54,12 @@ The regex for C system headers produces false positives on headers from "other l
5454

5555
``NOLINT`` can be appended in a comment to a header include to prevent wpiformat's header include sorter from modifying it and to maintain its relative ordering with other header includes. This will, in effect, treat it as a barrier across which no header includes will be moved. Header includes on each side of the barrier will still be sorted as normal.
5656

57-
.styleguide-license
58-
-------------------
57+
.wpiformat-license
58+
------------------
5959

60-
This file contains the license header template. It should contain ``Copyright (c)`` followed by the company name and the string ``{year}``. See the ``.styleguide-license`` file in the docs/examples directory.
60+
This file contains the license header template. It should contain ``Copyright (c)`` followed by the company name and the string ``{year}``. See the ``.wpiformat-license`` file in the docs/examples directory.
6161

62-
wpiformat checks the currently processed file's directory for a ``.styleguide`` file first and traverses up the directory tree if one isn't found. This allows templates which are closer to the processed file to override a project's main template.
62+
wpiformat checks the currently processed file's directory for a ``.wpiformat`` file first and traverses up the directory tree if one isn't found. This allows templates which are closer to the processed file to override a project's main template.
6363

6464
The license header is always at the beginning of the file and ends after two newlines. If there isn't one, or it doesn't contain the required copyright contents, wpiformat inserts a new one containing the current year.
6565

File renamed without changes.

wpiformat/wpiformat/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def proc_pipeline(name):
8787
Keyword arguments:
8888
name -- file name string
8989
"""
90-
config_file = Config(os.path.dirname(name), ".styleguide")
90+
config_file = Config(os.path.dirname(name), ".wpiformat")
9191
if verbose1 or verbose2:
9292
with print_lock:
9393
print("Processing", name)
@@ -129,7 +129,7 @@ def proc_standalone(name):
129129
Keyword arguments:
130130
name -- file name string
131131
"""
132-
config_file = Config(os.path.dirname(name), ".styleguide")
132+
config_file = Config(os.path.dirname(name), ".wpiformat")
133133
if verbose2:
134134
with print_lock:
135135
print("Processing", name)
@@ -179,7 +179,7 @@ def proc_batch(files):
179179
for subtask in task_pipeline:
180180
work = []
181181
for name in files:
182-
config_file = Config(os.path.dirname(name), ".styleguide")
182+
config_file = Config(os.path.dirname(name), ".wpiformat")
183183
if subtask.should_process_file(config_file, name):
184184
work.append(name)
185185

@@ -477,7 +477,7 @@ def main():
477477
# Don't run tasks on modifiable or generated files
478478
work = []
479479
for name in files:
480-
config_file = Config(os.path.dirname(name), ".styleguide")
480+
config_file = Config(os.path.dirname(name), ".wpiformat")
481481

482482
if config_file.is_modifiable_file(name):
483483
continue

wpiformat/wpiformat/licenseupdate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def run_pipeline(self, config_file, name, lines):
136136
linesep = super().get_linesep(lines)
137137

138138
_, license_template = Config.read_file(
139-
os.path.dirname(os.path.abspath(name)), ".styleguide-license"
139+
os.path.dirname(os.path.abspath(name)), ".wpiformat-license"
140140
)
141141

142142
# Get year when file was most recently modified in Git history

wpiformat/wpiformat/lint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def should_process_file(config_file, name):
2222

2323
@staticmethod
2424
def run_batch(config_file, names):
25-
# Handle running in either the root or styleguide directories
25+
# Handle running in either the root or wpiformat directories
2626
cpplintPrefix = ""
27-
if os.getcwd().rpartition(os.sep)[2] != "styleguide":
28-
cpplintPrefix = "styleguide/"
27+
if os.getcwd().rpartition(os.sep)[2] != "wpiformat":
28+
cpplintPrefix = "wpiformat/"
2929

3030
# Prepare arguments to cpplint.py
3131
saved_argv = sys.argv

wpiformat/wpiformat/test/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def test_config():
7-
config_file = Config(os.path.abspath(os.getcwd()), ".styleguide")
7+
config_file = Config(os.path.abspath(os.getcwd()), ".wpiformat")
88
assert config_file.is_modifiable_file(
99
"." + os.sep + "wpiformat" + os.sep + "javaguidelink.png"
1010
)

0 commit comments

Comments
 (0)