CodeEditApp / CodeEditApp/CodeEdit

🧰 SwiftLint: Global Parent Config for all Repositories

Đang mở
#1,204 4 bình luận 2 reaction 1 người được giao Được @lukepistrol nhận Xem trên GitHub
chore
Ngôn ngữ chính
Swift
Star
23k
Fork
1.2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

As discussed in our [Discord](https://discord.com/channels/951544472238444645/987416899816149024/1088930464171053138) we might use a global SwiftLint configuration across all our repos to have the styling guidelines applied everywhere.

This is already possible by SwiftLint itself: [Reference](https://github.com/realm/SwiftLint#child--parent-configs-remote)

## Proposed Solution

My suggestion is to add a new Repository in the organization called something similar to `CodeStyle` (open for suggestions though on the naming).

There we could host the `.swiftlint.yml` file which we can then include in each repo adding

```yaml
parent_config: https://raw.githubusercontent.com/CodeEditApp/{REPO_NAME}/main/.swiftlint.yml
```

This would fetch the config automatically when running SwiftLint. It also caches the latest version for situations where no internet connection is available.

If there are special needs, for example excluding some file paths, on a per repo basis, this could be overridden in the project's `.swiftlint.yml`.

## Attention Needed

When implementing this change it also is important to update the code on each repo to conform to this code style. The `CodeEdit` repo should be fine already since we already implemented the proper rules. The major task will be updating the relatively large codebase of `CodeEditTextView`.

## Future Additions

In the future we could also investigate how to add other configurations to this repo which might be needed on all the different repos.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.