Skip to content
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

Support version picking from .swiftlint.yml #18

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

edigaryev
Copy link
Collaborator

Resolves #16.

@edigaryev edigaryev requested a review from fkorotkov as a code owner May 23, 2024 11:32
@@ -123,3 +130,29 @@ export async function run(): Promise<void> {
if (error instanceof Error) core.setFailed(error.message)
}
}

function determineVersion(): string {
const userProvidedVersion: string = core.getInput('version')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it return null or undefined? should we make it safer:

Suggested change
const userProvidedVersion: string = core.getInput('version')
const userProvidedVersion: string = core.getInput('version') || ''

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so:

Screenshot 2024-05-23 at 19 01 48

@edigaryev edigaryev requested a review from fkorotkov May 23, 2024 15:02
@edigaryev edigaryev merged commit eb80361 into v1 May 23, 2024
3 checks passed
@edigaryev edigaryev deleted the support-version-picking branch May 23, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support version picking from .swiftlint.yml
2 participants