Skip to content

Commit

Permalink
tools: ditch iwyu
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Sep 17, 2024
1 parent 75a432c commit 823a45d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ repos:
entry: tools/additional_lint
language: python
stages: [commit]

- id: imports
name: imports
entry: tools/sort_imports
language: system
files: \.[ch](pp)?$
6 changes: 2 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ will be always considered supplementary.

This project uses [pre-commit](https://pre-commit.com/) to make sure the code
is formatted the right way. This tool has additional external dependencies:
`clang-format` for automatic code formatting and `include-what-you-use` to
remove unused `#include`s.
To install pre-commit:
`clang-format` for automatic code formatting. To install pre-commit:

```
python3 -m pip install --user pre-commit
Expand All @@ -83,7 +81,7 @@ pre-commit install
To install required external dependencies on Ubuntu:

```
apt-get install -y iwyu clang-format-18
apt-get install -y clang-format-18
```

After this, each time you make a commit a hook should trigger to automatically
Expand Down
1 change: 0 additions & 1 deletion src/game/clock.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// IWYU pragma: no_include <bits/types/struct_tm.h>
#include "game/clock.h"

#include "config.h"
Expand Down
2 changes: 0 additions & 2 deletions src/game/game_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

void GameString_Init(void)
{
// IWYU pragma: begin_keep
#include "game_string.def"
// IWYU pragma: end_keep
}

void GameString_Shutdown(void)
Expand Down
2 changes: 0 additions & 2 deletions src/specific/s_fmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

// IWYU pragma: no_include <libavcodec/defs.h>

#include "specific/s_fmv.h"

#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion subprojects/libtrx

0 comments on commit 823a45d

Please sign in to comment.