Skip to content

Latest commit

Β 

History

History
287 lines (225 loc) Β· 24.8 KB

CONTRIBUTING.md

File metadata and controls

287 lines (225 loc) Β· 24.8 KB

TBA (WIP)

initial stolen from Atom here.

...

How Do I Submit A (Good) Bug Report?

Bugs are tracked as GitHub issues. After you've determined which repository your bug is related to, create an issue on that repository and provide the following information by filling in the template.

Explain the problem and include additional details to help maintainers reproduce the problem:

  • Use a clear and descriptive title for the issue to identify the problem.
  • Describe the exact steps which reproduce the problem in as many details as possible. For example, start by explaining how you started Atom, e.g. which command exactly you used in the terminal, or how you started Atom otherwise. When listing steps, don't just say what you did, but explain how you did it. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Atom command, and if so which one?
  • Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
  • Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
  • Explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs which show you following the described steps and clearly demonstrate the problem. If you use the keyboard while following the steps, record the GIF with the Keybinding Resolver shown. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • If you're reporting that Atom crashed, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in Console.app under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a code block, a file attachment, or put it in a gist and provide link to that gist.
  • If the problem is related to performance or memory, include a CPU profile capture with your report.
  • If Chrome's developer tools pane is shown without you triggering it, that normally means that you have a syntax error in one of your themes or in your styles.less. Try running in Safe Mode and using a different theme or comment out the contents of your styles.less to see if that fixes the problem.
  • If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below.

Provide more context by answering these questions:

  • Can you reproduce the problem in safe mode?
  • Did the problem start happening recently (e.g. after updating to a new version of Atom) or was this always a problem?
  • If the problem started happening recently, can you reproduce the problem in an older version of Atom? What's the most recent version in which the problem doesn't happen? You can download older versions of Atom from the releases page.
  • Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
  • If the problem is related to working with files (e.g. opening and editing files), does the problem happen for all files and projects or only some? Does the problem happen only when working with local or remote files (e.g. on network drives), with files of a specific type (e.g. only JavaScript or Python files), with large files or files with very long lines, or with files in a specific encoding? Is there anything else special about the files you are using?

Include details about your configuration and environment:

  • Which version of Atom are you using? You can get the exact version by running atom -v in your terminal, or by starting Atom and running the Application: About command from the Command Palette.
  • What's the name and version of the OS you're using?
  • Are you running Atom in a virtual machine? If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
  • Which packages do you have installed? You can get that list by running apm list --installed.
  • Are you using local configuration files config.cson, keymap.cson, snippets.cson, styles.less and init.coffee to customize Atom? If so, provide the contents of those files, preferably in a code block or with a link to a gist.
  • Are you using Atom with multiple monitors? If so, can you reproduce the problem when you use a single monitor?
  • Which keyboard layout are you using? Are you using a US layout or some other layout?

Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Atom, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion πŸ“ and find related suggestions πŸ”Ž.

Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.

Before Submitting An Enhancement Suggestion

How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as GitHub issues. After you've determined which repository your enhancement suggestion is related to, create an issue on that repository and provide the following information:

  • Use a clear and descriptive title for the issue to identify the suggestion.
  • Provide a step-by-step description of the suggested enhancement in as many details as possible.
  • Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
  • Describe the current behavior and explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs which help you demonstrate the steps or point out the part of Atom which the suggestion is related to. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • Explain why this enhancement would be useful to most Atom users and isn't something that can or should be implemented as a community package.
  • List some other text editors or applications where this enhancement exists.
  • Specify which version of Atom you're using. You can get the exact version by running atom -v in your terminal, or by starting Atom and running the Application: About command from the Command Palette.
  • Specify the name and version of the OS you're using.

Your First Code Contribution

Unsure where to begin contributing to Atom? You can start by looking through these beginner and help-wanted issues:

  • [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two.
  • [Help wanted issues][help-wanted] - issues which should be a bit more involved than beginner issues.

Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have.

If you want to read about using Atom or developing packages in Atom, the Atom Flight Manual is free and available online. You can find the source to the manual in atom/flight-manual.atom.io.

Local development

Atom Core and all packages can be developed locally. For instructions on how to do this, see the following sections in the Atom Flight Manual:

  • [Hacking on Atom Core][hacking-on-atom-core]
  • [Contributing to Official Atom Packages][contributing-to-official-atom-packages]

Pull Requests

  • Fill in the required template
  • Do not include issue numbers in the PR title
  • Include screenshots and animated GIFs in your pull request whenever possible.
  • Follow the JavaScript and CoffeeScript styleguides.
  • Include thoughtfully-worded, well-structured Jasmine specs in the ./spec folder. Run them using atom --test spec. See the Specs Styleguide below.
  • Document new code based on the Documentation Styleguide
  • End all files with a newline
  • Avoid platform-dependent code
  • Place requires in the following order:
    • Built in Node Modules (such as path)
    • Built in Atom and Electron Modules (such as atom, remote)
    • Local Modules (using relative paths)
  • Place class properties in the following order:
    • Class methods and properties (methods starting with a @ in CoffeeScript or static in JavaScript)
    • Instance methods and properties

Styleguides

Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji:
    • 🎨 :art: when improving the format/structure of the code
    • 🐎 :racehorse: when improving performance
    • 🚱 :non-potable_water: when plugging memory leaks
    • πŸ“ :memo: when writing docs
    • 🐧 :penguin: when fixing something on Linux
    • 🍎 :apple: when fixing something on macOS
    • 🏁 :checkered_flag: when fixing something on Windows
    • πŸ› :bug: when fixing a bug
    • πŸ”₯ :fire: when removing code or files
    • πŸ’š :green_heart: when fixing the CI build
    • βœ… :white_check_mark: when adding tests
    • πŸ”’ :lock: when dealing with security
    • ⬆️ :arrow_up: when upgrading dependencies
    • ⬇️ :arrow_down: when downgrading dependencies
    • πŸ‘• :shirt: when removing linter warnings

JavaScript Styleguide

All JavaScript must adhere to JavaScript Standard Style.

  • Prefer the object spread operator ({...anotherObj}) to Object.assign()
  • Inline exports with expressions whenever possible
    // Use this:
    export default class ClassName {
    
    }
    
    // Instead of:
    class ClassName {
    
    }
    export default ClassName

CoffeeScript Styleguide

  • Set parameter defaults without spaces around the equal sign
    • clear = (count=1) -> instead of clear = (count = 1) ->
  • Use spaces around operators
    • count + 1 instead of count+1
  • Use spaces after commas (unless separated by newlines)
  • Use parentheses if it improves code clarity.
  • Prefer alphabetic keywords to symbolic keywords:
    • a is b instead of a == b
  • Avoid spaces inside the curly-braces of hash literals:
    • {a: 1, b: 2} instead of { a: 1, b: 2 }
  • Include a single line of whitespace between methods.
  • Capitalize initialisms and acronyms in names, except for the first word, which should be lower-case:
    • getURI instead of getUri
    • uriToOpen instead of URIToOpen
  • Use slice() to copy an array
  • Add an explicit return when your function ends with a for/while loop and you don't want it to return a collected array.
  • Use this instead of a standalone @
    • return this instead of return @

Specs Styleguide

  • Include thoughtfully-worded, well-structured Jasmine specs in the ./spec folder.
  • Treat describe as a noun or situation.
  • Treat it as a statement about state or how an operation changes state.

Example

describe 'a dog', ->
 it 'barks', ->
 # spec here
 describe 'when the dog is happy', ->
  it 'wags its tail', ->
  # spec here

Documentation Styleguide

  • Use AtomDoc.
  • Use Markdown.
  • Reference methods and classes in markdown with the custom {} notation:
    • Reference classes with {ClassName}
    • Reference instance methods with {ClassName::methodName}
    • Reference class methods with {ClassName.methodName}

Example

# Public: Disable the package with the given name.
#
# * `name`    The {String} name of the package to disable.
# * `options` (optional) The {Object} with disable options (default: {}):
#   * `trackTime`     A {Boolean}, `true` to track the amount of time taken.
#   * `ignoreErrors`  A {Boolean}, `true` to catch and ignore errors thrown.
# * `callback` The {Function} to call after the package has been disabled.
#
# Returns `undefined`.
disablePackage: (name, options, callback) ->

Additional Notes

Issue and Pull Request Labels

This section lists the labels we use to help us track and manage issues and pull requests. Most labels are used across all Atom repositories, but some are specific to atom/atom.

GitHub search makes it easy to use labels for finding groups of issues or pull requests you're interested in. For example, you might be interested in open issues across atom/atom and all Atom-owned packages which are labeled as bugs, but still need to be reliably reproduced or perhaps open pull requests in atom/atom which haven't been reviewed yet. To help you find issues and pull requests, each label is listed with search links for finding open items with that label in atom/atom only and also across all Atom repositories. We encourage you to read about other search filters which will help you write more focused queries.

The labels are loosely grouped by their purpose, but it's not required that every issue have a label from every group or that an issue can't have more than one label from the same group.

Please open an issue on atom/atom if you have suggestions for new labels, and if you notice some labels are missing on some repositories, then please open an issue on that repository.

Type of Issue and Issue State

Label name atom/atom πŸ”Ž atom‑org πŸ”Ž Description
enhancement [search][search-atom-repo-label-enhancement] [search][search-atom-org-label-enhancement] Feature requests.
bug [search][search-atom-repo-label-bug] [search][search-atom-org-label-bug] Confirmed bugs or reports that are very likely to be bugs.
question [search][search-atom-repo-label-question] [search][search-atom-org-label-question] Questions more than bug reports or feature requests (e.g. how do I do X).
feedback [search][search-atom-repo-label-feedback] [search][search-atom-org-label-feedback] General feedback more than bug reports or feature requests.
help-wanted [search][search-atom-repo-label-help-wanted] [search][search-atom-org-label-help-wanted] The Atom core team would appreciate help from the community in resolving these issues.
beginner [search][search-atom-repo-label-beginner] [search][search-atom-org-label-beginner] Less complex issues which would be good first issues to work on for users who want to contribute to Atom.
more-information-needed [search][search-atom-repo-label-more-information-needed] [search][search-atom-org-label-more-information-needed] More information needs to be collected about these problems or feature requests (e.g. steps to reproduce).
needs-reproduction [search][search-atom-repo-label-needs-reproduction] [search][search-atom-org-label-needs-reproduction] Likely bugs, but haven't been reliably reproduced.
blocked [search][search-atom-repo-label-blocked] [search][search-atom-org-label-blocked] Issues blocked on other issues.
duplicate [search][search-atom-repo-label-duplicate] [search][search-atom-org-label-duplicate] Issues which are duplicates of other issues, i.e. they have been reported before.
wontfix [search][search-atom-repo-label-wontfix] [search][search-atom-org-label-wontfix] The Atom core team has decided not to fix these issues for now, either because they're working as intended or for some other reason.
invalid [search][search-atom-repo-label-invalid] [search][search-atom-org-label-invalid] Issues which aren't valid (e.g. user errors).
package-idea [search][search-atom-repo-label-package-idea] [search][search-atom-org-label-package-idea] Feature request which might be good candidates for new packages, instead of extending Atom or core Atom packages.
wrong-repo [search][search-atom-repo-label-wrong-repo] [search][search-atom-org-label-wrong-repo] Issues reported on the wrong repository (e.g. a bug related to the Settings View package was reported on Atom core).

Topic Categories

Label name atom/atom πŸ”Ž atom‑org πŸ”Ž Description
windows [search][search-atom-repo-label-windows] [search][search-atom-org-label-windows] Related to Atom running on Windows.
linux [search][search-atom-repo-label-linux] [search][search-atom-org-label-linux] Related to Atom running on Linux.
mac [search][search-atom-repo-label-mac] [search][search-atom-org-label-mac] Related to Atom running on macOS.
documentation [search][search-atom-repo-label-documentation] [search][search-atom-org-label-documentation] Related to any type of documentation (e.g. API documentation and the flight manual).
performance [search][search-atom-repo-label-performance] [search][search-atom-org-label-performance] Related to performance.
security [search][search-atom-repo-label-security] [search][search-atom-org-label-security] Related to security.
ui [search][search-atom-repo-label-ui] [search][search-atom-org-label-ui] Related to visual design.
api [search][search-atom-repo-label-api] [search][search-atom-org-label-api] Related to Atom's public APIs.
uncaught-exception [search][search-atom-repo-label-uncaught-exception] [search][search-atom-org-label-uncaught-exception] Issues about uncaught exceptions, normally created from the Notifications package.
crash [search][search-atom-repo-label-crash] [search][search-atom-org-label-crash] Reports of Atom completely crashing.
auto-indent [search][search-atom-repo-label-auto-indent] [search][search-atom-org-label-auto-indent] Related to auto-indenting text.
encoding [search][search-atom-repo-label-encoding] [search][search-atom-org-label-encoding] Related to character encoding.
network [search][search-atom-repo-label-network] [search][search-atom-org-label-network] Related to network problems or working with remote files (e.g. on network drives).
git [search][search-atom-repo-label-git] [search][search-atom-org-label-git] Related to Git functionality (e.g. problems with gitignore files or with showing the correct file status).

atom/atom Topic Categories

Label name atom/atom πŸ”Ž atom‑org πŸ”Ž Description
editor-rendering [search][search-atom-repo-label-editor-rendering] [search][search-atom-org-label-editor-rendering] Related to language-independent aspects of rendering text (e.g. scrolling, soft wrap, and font rendering).
build-error [search][search-atom-repo-label-build-error] [search][search-atom-org-label-build-error] Related to problems with building Atom from source.
error-from-pathwatcher [search][search-atom-repo-label-error-from-pathwatcher] [search][search-atom-org-label-error-from-pathwatcher] Related to errors thrown by the pathwatcher library.
error-from-save [search][search-atom-repo-label-error-from-save] [search][search-atom-org-label-error-from-save] Related to errors thrown when saving files.
error-from-open [search][search-atom-repo-label-error-from-open] [search][search-atom-org-label-error-from-open] Related to errors thrown when opening files.
installer [search][search-atom-repo-label-installer] [search][search-atom-org-label-installer] Related to the Atom installers for different OSes.
auto-updater [search][search-atom-repo-label-auto-updater] [search][search-atom-org-label-auto-updater] Related to the auto-updater for different OSes.
deprecation-help [search][search-atom-repo-label-deprecation-help] [search][search-atom-org-label-deprecation-help] Issues for helping package authors remove usage of deprecated APIs in packages.
electron [search][search-atom-repo-label-electron] [search][search-atom-org-label-electron] Issues that require changes to Electron to fix or implement.

Pull Request Labels

Label name atom/atom πŸ”Ž atom‑org πŸ”Ž Description
work-in-progress [search][search-atom-repo-label-work-in-progress] [search][search-atom-org-label-work-in-progress] Pull requests which are still being worked on, more changes will follow.
needs-review [search][search-atom-repo-label-needs-review] [search][search-atom-org-label-needs-review] Pull requests which need code review, and approval from maintainers or Atom core team.
under-review [search][search-atom-repo-label-under-review] [search][search-atom-org-label-under-review] Pull requests being reviewed by maintainers or Atom core team.
requires-changes [search][search-atom-repo-label-requires-changes] [search][search-atom-org-label-requires-changes] Pull requests which need to be updated based on review comments and then reviewed again.
needs-testing [search][search-atom-repo-label-needs-testing] [search][search-atom-org-label-needs-testing] Pull requests which need manual testing.