-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See issue #77: Starting to create some files - but hard to download f…
…rom Homebrew - Need to have a Swift compilation working, so we can build locally
- Loading branch information
1 parent
bdcdeca
commit 0d0a9f1
Showing
5 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
python_sources() |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
python_tests( | ||
name="tests", | ||
overrides={ | ||
"rules_integration_test.py": {"timeout": 240}, | ||
}, | ||
) |
Empty file.
24 changes: 24 additions & 0 deletions
24
pants-plugins/experimental/swift/lint/swiftformat/skip_field.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Iterable | ||
|
||
from experimental.swift.target_types import SwiftSourcesGeneratorTarget, SwiftSourceTarget | ||
from pants.engine.rules import Rule | ||
from pants.engine.target import BoolField | ||
from pants.engine.unions import UnionRule | ||
|
||
|
||
class SkipSwiftFormatField(BoolField): | ||
alias = "skip_swift_format" | ||
default = False | ||
help = "If true, don't run swift-format on this target's code." | ||
|
||
|
||
def rules() -> Iterable[Rule | UnionRule]: | ||
return ( | ||
SwiftSourcesGeneratorTarget.register_plugin_field(SkipSwiftFormatField), | ||
SwiftSourceTarget.register_plugin_field(SkipSwiftFormatField), | ||
) |