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

[docs] fix tool name formatting (for supply) to be lowercase to pass fastlane docs unit tests #21426

Merged
merged 1 commit into from Jul 29, 2023

Conversation

rogerluan
Copy link
Member

@rogerluan rogerluan commented Jul 28, 2023

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've updated the documentation if necessary.

Motivation and Context

Resolves this issue:

image

Link: https://app.circleci.com/pipelines/github/fastlane/docs/739/workflows/6d6bc075-ecec-4248-9764-d481f19a56a5/jobs/3261

Description

The validation comes from here:

fastlane/fastlane/Fastfile

Lines 585 to 607 in 600555c

desc "Ensure the correct formatting for the fastlane tools"
private_lane :ensure_tool_name_formatting do
UI.message("πŸ•— Verifying tool name formatting...")
require 'fastlane/tools'
errors = []
Dir.chdir("..") do
Dir["**/*.md"].each do |path|
content = File.read(path)
Fastlane::TOOLS.each do |tool|
errors << "Use _#{tool}_ instead of `#{tool}` to mention a tool in the docs in '#{path}'" if content.include?("`#{tool}`")
errors << "Use _#{tool}_ instead of `_#{tool}_` to mention a tool in the docs in '#{path}'" if content.include?("`_#{tool}_`")
errors << "Use [_#{tool}_] instead of [#{tool}] to mention a tool in the docs in '#{path}'" if content.include?("[#{tool}]")
errors << "Use <em>#{tool}<em> instead of <code>#{tool}</code> to mention a tool in the docs in '#{path}'" if content.include?("<code>#{tool}</code>")
if content.include?("_#{tool.to_s.capitalize}_") || content.include?("`#{tool.to_s.capitalize}`")
errors << "fastlane tools have to be formatted in lower case: #{tool} in '#{path}'"
end
end
end
end
errors.each { |a| UI.error(a) }
UI.user_error!("Invalid formatting of one of the fastlane tools") unless errors.empty?
UI.success("βœ… fastlane tools formatting is correct")
end

Testing Steps

N/A

Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

And here I was wondering the other day why the docs on the web didn't list my new action πŸ˜…
Thanks for the fix!

@rogerluan rogerluan merged commit 4ac1d96 into master Jul 29, 2023
9 checks passed
@rogerluan rogerluan deleted the rogerluan-fix-tool-formatting branch July 29, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants