-
Notifications
You must be signed in to change notification settings - Fork 433
Support Swift for private beta #1350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
4427955
adfbae4
1cdcaf7
b526abc
72dbccd
090548b
3e6f649
d6414c4
86df1ab
ed58b38
8527e41
e0014d3
dd1d95c
e497cf7
2467cb2
a950865
3259a86
8b24588
0ec5b02
000635b
80c5706
2c7ea3c
40cb562
f830609
8bd78c9
2532fa4
3775c97
ff1fbd6
7ae39f5
15ede9a
47ef245
ab64860
a89c325
0fc3101
1150eff
91a8648
58d403c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: "Swift analysis" | ||
| description: "Tests creation of a Swift database" | ||
| versions: ["latest", "cached", "nightly-latest"] | ||
| operatingSystems: ["ubuntu", "macos"] | ||
| env: | ||
| CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT: "true" | ||
| steps: | ||
| - uses: ./../action/init | ||
| with: | ||
| languages: swift | ||
| tools: ${{ steps.prepare-test.outputs.tools-url }} | ||
| env: | ||
| TEST_MODE: true | ||
| - name: Build code | ||
| shell: bash | ||
| run: ./build.sh | ||
angelapwen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - uses: ./../action/analyze | ||
| id: analysis | ||
| env: | ||
| TEST_MODE: true | ||
| - name: Check database | ||
| shell: bash | ||
| run: | | ||
| SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}" | ||
| if [[ ! -d "$SWIFT_DB" ]]; then | ||
| echo "Did not create a database for Swift." | ||
| exit 1 | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // swift-tools-version: 5.7 | ||
| // The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "helloWorld", | ||
| products: [ | ||
| // Products define the executables and libraries a package produces, and make them visible to other packages. | ||
| .library( | ||
| name: "helloWorld", | ||
| targets: ["helloWorld"]), | ||
| ], | ||
| dependencies: [ | ||
| // Dependencies declare other packages that this package depends on. | ||
| // .package(url: /* package url */, from: "1.0.0"), | ||
| ], | ||
| targets: [ | ||
| // Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
| // Targets can depend on other targets in this package, and on products in packages this package depends on. | ||
| .target( | ||
| name: "helloWorld", | ||
| path: "swift-src/helloWorld" | ||
| ) | ||
| ] | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| public struct main { | ||
| public private(set) var text = "Hello, World!" | ||
|
|
||
| public init() { | ||
| if (true) { | ||
| print(text) | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.