Skip to content

Commit

Permalink
Merge branch 'main' into henrikth93-remove-triangle-#514
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis authored Nov 20, 2024
2 parents c3fdfd7 + d808dcd commit 23513d8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Thank you for your pull request! 🚀
<!-- Please replace the empty checkboxes [] below with checked ones [x] accordingly. -->

- [] This pull request is on a [separate branch](https://docs.github.com/en/get-started/quickstart/github-flow) and not the main branch
- [] I have tested my code with the `xcodebuild` and `swiftlint --strict` commands as directed in the [testing section of the contributing guide](https://github.com/scribe-org/Scribe-iOS/blob/main/CONTRIBUTING.md#testing)

---

Expand Down
6 changes: 1 addition & 5 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# SwiftLint Configuration File

disabled_rules:
# ERRORS IN PROJECT CURRENTLY
# Currently raise errors:
- cyclomatic_complexity
- identifier_name
- function_body_length
Expand All @@ -10,8 +8,6 @@ disabled_rules:
- line_length
- file_length
- type_body_length
# WARNINGS IN PROJECT CURRENTLY
- todo

identifier_name:
min_length: 1
Expand Down
31 changes: 30 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ If you have questions or would like to communicate with the team, please [join u
- [Learning the tech stack](#learning-the-tech)
- [Development environment](#dev-env)
- [Note on debugging](#note-on-debugging)
- [Testing](#testing)
- [Issues and projects](#issues-projects)
- [Bug reports](#bug-reports)
- [Feature requests](#feature-requests)
Expand Down Expand Up @@ -146,7 +147,7 @@ The Xcode debugger often doesn't work as expected for Scribe as the keyboards th
- When you get a window telling you to "choose an app to run", don't choose Scribe as you might expect, but instead scroll down and select Xcode Previews
- Occasionally you'll be met with just a black screen on startup, in which case you can press Home (or ⇧-⌘-H) and then go directly to Scribe or an app for keyboard testing

### Adding the file header template to Xcode
### Adding file header template to Xcode

As [GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) licensed technology, Scribe is expected to include a license header in all files within the codebase. A template for this has been provided in the `ScribeTemplates` directory. You can have this header automatically added to the top of files by executing the following commands to add it to your Xcode templates:

Expand All @@ -155,6 +156,34 @@ mkdir ~/Library/Developer/Xcode/Templates
ln -s PATH_TO_LOCAL_SCRIBE_DIRECTORY/Scribe-iOS/ScribeTemplates ~/Library/Developer/Xcode/Templates/
```

<a id="testing"></a>

## Testing [``](#contents)

Writing unit tests is essential to guarantee the dependability and sustainability of the Scribe-iOS codebase. Unit tests confirm that individual components of the application work as intended by detecting errors at an early stage, thus making the debugging process easier and boosting assurance for upcoming modifications. An unchanging testing method helps new team members grasp project norms and anticipated actions.

In addition to the [pre-commit](https://pre-commit.com/) hooks that are set up during the [development environment section](#dev-env), Scribe-iOS includes a testing suite that should be ran before all pull requests and subsequent commits.

Please run the following in the project root:

```bash
# Build and test the application:
xcodebuild -scheme Scribe -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' clean build
xcodebuild -scheme Scribe -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' test

# If you don't have swiftlint installed:
# brew install swiftlint

# Lint the project:
swiftlint --strict
```

If you see that there are linting errors above, then please run the following command to hopefully fix them automatically:

```bash
swiftlint --fix
```

<a id="issues-projects"></a>

# Issues and projects [``](#contents)
Expand Down

0 comments on commit 23513d8

Please sign in to comment.