Commit 3f777766 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'mc/backstage/add-projections-file' into 'master'

Add projections file

See merge request gitlab-org/gitlab!17460
parents e9896170 bc2cc127
......@@ -81,3 +81,4 @@ package-lock.json
jsdoc/
**/tmp/rubocop_cache/**
.overcommit.yml
.projections.json
{
"app/*.rb": {
"alternate": "spec/{}_spec.rb",
"type": "source"
},
"spec/*_spec.rb": {
"alternate": "app/{}.rb",
"type": "test"
},
"lib/*.rb": {
"alternate": "spec/lib/{}_spec.rb",
"type": "source"
},
"spec/lib/*_spec.rb": {
"alternate": "lib/{}.rb",
"type": "test"
},
"ee/app/*.rb": {
"alternate": "ee/spec/{}_spec.rb",
"type": "source"
},
"ee/spec/*_spec.rb": {
"alternate": "ee/app/{}.rb",
"type": "test"
},
"ee/lib/*.rb": {
"alternate": "ee/spec/lib/{}_spec.rb",
"type": "source"
},
"ee/spec/lib/*_spec.rb": {
"alternate": "ee/lib/{}.rb",
"type": "test"
},
"*.rb": {"dispatch": "bundle exec rubocop {file}"},
"*_spec.rb": {"dispatch": "bundle exec rspec {file}"}
}
......@@ -165,6 +165,10 @@ description: 'Learn how to contribute to GitLab.'
- [Shell scripting standards and style guidelines](shell_scripting_guide/index.md)
## Other Development guides
- [Defining relations between files using projections](projections.md)
## Other GitLab Development Kit (GDK) guides
- [Run full Auto DevOps cycle in a GDK instance](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/auto_devops.md)
......
# Projections
Projections are a way to define relations between files. Every file can have a
"related" or "alternate" file. It's common to consider spec files to be
"alternate" files to source files.
## How to use it
- Install an editor plugin that consumes projections
- Copy `.projections.json.example` to `.projections.json`
## How to customize it
You can find a basic list of projection options in
[projectionist.txt](https://github.com/tpope/vim-projectionist/blob/master/doc/projectionist.txt)
## Which plugins can I use
- vim
- [vim-projectionist](https://github.com/tpope/vim-projectionist)
- VSCode
- [Alternate File](https://marketplace.visualstudio.com/items?itemName=will-wow.vscode-alternate-file)
- [projectionist](https://github.com/jarsen/projectionist)
- [jumpto](https://github.com/gmdayley/jumpto)
- Atom
- [projectionist-atom](https://atom.io/packages/projectionist-atom)
- Command-line
- [projectionist](https://github.com/glittershark/projectionist)
## History
This started as a
[plugin for vim by tpope](https://github.com/tpope/vim-projectionist)
It has since become editor-agnostic and ported to most modern editors.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment