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] add minor branding guidelines to CONTRIBUTING.md #21495

Merged
merged 20 commits into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ One of the best ways we can keep _fastlane_ an approachable, stable, and dependa

Help us keep _fastlane_ open and inclusive. Please read and follow our [Code of Conduct][code of conduct].

## Branding

Although we don't have a formal style guide, we do have a few guidelines for how to refer to _fastlane_ and its tools:
rogerluan marked this conversation as resolved.
Show resolved Hide resolved

- _fastlane_ and all of the its actions should be written in all lowercase, even at the beginning of a sentence:
rogerluan marked this conversation as resolved.
Show resolved Hide resolved
- ❌ "Use Fastlane to automate your screenshots."
- ❌ "Use _Fastlane_ to automate your screenshots."
- ❌ "Fastlane helps you deliver faster."
- ❌ "Match makes code signing management easy."
- ✅ "Use _fastlane_ to automate your screenshots."
- ✅ "_fastlane_ helps you deliver faster."
- ✅ "_match_ makes code signing management easy."
- _fastlane_ and all of its actions should be italicized when written in prose:
- ❌ "`fastlane` is an all-in-one tool for app automation."
- ❌ "**fastlane** is an all-in-one tool for app automation."
- ❌ "fastlane is an all-in-one tool for app automation."
- ❌ "<ins>fastlane</ins> is an all-in-one tool for app automation."
- ❌ "`match` makes code signing management easy."
- ✅ "_fastlane_ is an all-in-one tool for app automation."
- ✅ "_match_ makes code signing management easy."

Please use these guidelines when writing about _fastlane_ and its tools, be it when contributing to the project or writing about it elsewhere.

## Above All, Thanks for Your Contributions

Thank you for reading to the end, and for taking the time to contribute to the project! If you include the 🔑 emoji at the top of the body of your issue or pull request, we'll know that you've given this your full attention and are doing your best to help!
Expand Down
21 changes: 15 additions & 6 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,21 @@ private_lane :ensure_tool_name_formatting 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}'"
lines = content.split("\n")
lines.each_with_index do |line, index|
line_number = index + 1
# Ignore checks if line starts with "^\s*- ❌" (i.e. if it's a line that's already been marked as incorrect)
# and if the file is CONTRIBUTING.md (i.e. if it's the branding guidelines section)
next if line =~ /^\s*- ❌/ && path == "CONTRIBUTING.md"
errors << "Use _#{tool}_ instead of `#{tool}` to mention a tool in the docs in '#{path}:#{line_number}'" if line.include?("`#{tool}`")
errors << "Use _#{tool}_ instead of `_#{tool}_` to mention a tool in the docs in '#{path}:#{line_number}'" if line.include?("`_#{tool}_`")
errors << "Use [_#{tool}_] instead of [#{tool}] to mention a tool in the docs in '#{path}:#{line_number}'" if line.include?("[#{tool}]")
errors << "Use _#{tool}_ instead of **#{tool}** to mention a tool in the docs in '#{path}:#{line_number}'" if line.include?("**#{tool}**")
errors << "Use <em>#{tool}<em> instead of <code>#{tool}</code> to mention a tool in the docs in '#{path}:#{line_number}'" if line.include?("<code>#{tool}</code>")
errors << "Use <em>#{tool}<em> or _#{tool}_ instead of <ins>#{tool}</ins> to mention a tool in the docs in '#{path}:#{line_number}'" if line.include?("<ins>#{tool}</ins>")
if line.include?("_#{tool.to_s.capitalize}_") || line.include?("`#{tool.to_s.capitalize}`") || line.include?(" #{tool.to_s.capitalize} ")
rogerluan marked this conversation as resolved.
Show resolved Hide resolved
errors << "fastlane tools have to be formatted in lowercase: #{tool} in '#{path}:#{line_number}'"
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion fastlane/lib/fastlane/actions/docs/build_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fastlane gym

_gym_ uses the latest APIs to build and sign your application which results in much faster build times.

| | Gym Features |
| | _gym_ |
|----------|----------------|
🚀 | _gym_ builds 30% faster than other build tools like [shenzhen](https://github.com/nomad/shenzhen)
🏁 | Beautiful inline build output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ androidTestImplementation 'tools.fastlane:screengrab:x.x.x'

The latest version is [ ![Download](https://maven-badges.herokuapp.com/maven-central/tools.fastlane/screengrab/badge.svg)](https://search.maven.org/artifact/tools.fastlane/screengrab)

As of Screengrab version 2.0.0, all Android test dependencies are AndroidX dependencies. This means a device with API 18+, Android 4.3 or greater is required. If you wish to capture screenshots with an older Android OS, then you must use a 1.x.x version.
As of _screengrab_ version 2.0.0, all Android test dependencies are AndroidX dependencies. This means a device with API 18+, Android 4.3 or greater is required. If you wish to capture screenshots with an older Android OS, then you must use a 1.x.x version.
AliSoftware marked this conversation as resolved.
Show resolved Hide resolved

##### Configuring your Manifest Permissions

Expand Down Expand Up @@ -63,21 +63,21 @@ Ensure that the following permissions exist in your **src/debug/AndroidManifest.
1. Add `LocaleTestRule` to your tests class to handle automatic switching of locales.

If you're using Java use:

```java
@ClassRule
public static final LocaleTestRule localeTestRule = new LocaleTestRule();
```

If you're using Kotlin use:

```kotlin
@Rule @JvmField
val localeTestRule = LocaleTestRule()
```

The `@JvmField` annotation is important. It won't work like this:

```kotlin
companion object {
@get:ClassRule
Expand Down
2 changes: 1 addition & 1 deletion fastlane/lib/fastlane/new_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def self.run(new_action_name: nil)
end

def self.fetch_name
puts("Must be lower case, and use a '_' between words. Do not use '.'".green)
puts("Must be lowercase, and use a '_' between words. Do not use '.'".green)
puts("examples: 'testflight', 'upload_to_s3'".green)
name = UI.input("Name of your action: ")
until name_valid?(name)
Expand Down
6 changes: 3 additions & 3 deletions fastlane/lib/fastlane/plugins/plugin_info_collector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def collect_plugin_name(initial_name = nil)
@ui.message("\nThe gem name '#{gem_name}' is already taken on RubyGems, please choose a different plugin name.")
else
# That's a naming error
@ui.message("\nPlugin names can only contain lower case letters, numbers, and underscores")
@ui.message("\nPlugin names can only contain lowercase letters, numbers, and underscores")
@ui.message("and should not contain 'fastlane' or 'plugin'.")
end
end
Expand All @@ -54,7 +54,7 @@ def collect_plugin_name(initial_name = nil)
end

def plugin_name_valid?(name)
# Only lower case letters, numbers and underscores allowed
# Only lowercase letters, numbers and underscores allowed
/^[a-z0-9_]+$/ =~ name &&
# Does not contain the words 'fastlane' or 'plugin' since those will become
# part of the gem name
Expand All @@ -79,7 +79,7 @@ def fix_plugin_name(name)
name = name.to_s.downcase
fixes = {
/[\- ]/ => '_', # dashes and spaces become underscores
/[^a-z0-9_]/ => '', # anything other than lower case letters, numbers and underscores is removed
/[^a-z0-9_]/ => '', # anything other than lowercase letters, numbers and underscores is removed
/fastlane[_]?/ => '', # 'fastlane' or 'fastlane_' is removed
/plugin[_]?/ => '' # 'plugin' or 'plugin_' is removed
}
Expand Down
2 changes: 1 addition & 1 deletion spaceship/docs/Architecture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Spaceship Architecture
# _spaceship_ Architecture

_spaceship_ uses [Faraday](https://github.com/lostisland/faraday) to interact with multiple Apple API endpoints:

Expand Down
2 changes: 1 addition & 1 deletion spaceship/docs/DeveloperPortal.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ profiles = Spaceship::Portal.provisioning_profile.in_house.all

### Multiple Spaceships

Sometimes one _spaceship_ just isn't enough. That's why this library has its own Spaceship Launcher to launch and use multiple _spaceships_ at the same time :rocket:
Sometimes one _spaceship_ just isn't enough. That's why this library has its own _spaceship_ launcher to launch and use multiple _spaceships_ at the same time :rocket:

```ruby
# Launch 2 spaceships
Expand Down
2 changes: 1 addition & 1 deletion spaceship/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Spaceship Documentation
# _spaceship_ Documentation

## API

Expand Down