Compare commits

...

12 Commits

Author SHA1 Message Date
Brendan Forster
133c57afa5 add newline 2018-06-18 08:46:31 -03:00
Brendan Forster
dc9c75a9f0 and an editorconfig to prevent future mistakes 2018-06-18 08:46:00 -03:00
Brendan Forster
7603d71a56 add reviewers element 2018-06-18 08:36:39 -03:00
Brendan Forster
de60b262fc ensure all touched files end in a newline 2018-06-18 08:23:53 -03:00
Brendan Forster
9b955e4787 replace symlinks with metadata 2018-06-18 07:36:15 -03:00
Brendan Forster
e734a55eb6 eliminate duplication of JetBrains rules in VisualStudio 2018-06-18 06:59:22 -03:00
Brendan Forster
8c48d15ecb point the Android template to the JetBrains template to eliminate duplication 2018-06-18 06:59:00 -03:00
Brendan Forster
13293bc8ac add hints that JetBrains and VSCode can support VisualStudio projects 2018-06-18 06:58:13 -03:00
Brendan Forster
22a63953fb add metadata to unify the XCode/ObjC/Swift templates 2018-06-18 06:57:10 -03:00
Brendan Forster
3fe5f882ec hint that both JetBrains and VSCode support Python 2018-06-18 06:56:17 -03:00
Brendan Forster
677c7abacf extract JetBrains header information into metadata 2018-06-18 06:55:42 -03:00
Brendan Forster
74ba388528 first pass at some docs for this idea 2018-06-18 06:54:30 -03:00
19 changed files with 119 additions and 155 deletions

3
.editorconfig Normal file
View File

@ -0,0 +1,3 @@
[*]
end_of_line = lf
insert_final_newline = true

View File

@ -32,16 +32,6 @@ proguard/
# Android Studio captures folder # Android Studio captures folder
captures/ captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files # Keystore files
# Uncomment the following line if you do not want to check your keystore files in. # Uncomment the following line if you do not want to check your keystore files in.
#*.jks #*.jks

2
Android.yml Normal file
View File

@ -0,0 +1,2 @@
editors:
- Global/JetBrains.gitignore

2
C++.yml Normal file
View File

@ -0,0 +1,2 @@
aliases:
- Fortran

View File

@ -1 +0,0 @@
Leiningen.gitignore

View File

@ -1 +0,0 @@
C++.gitignore

View File

@ -1,6 +1,3 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff # User-specific stuff
.idea/**/workspace.xml .idea/**/workspace.xml
.idea/**/tasks.xml .idea/**/tasks.xml
@ -50,3 +47,6 @@ fabric.properties
# Editor-based Rest Client # Editor-based Rest Client
.idea/httpRequests .idea/httpRequests
# Rider-specific rules
*.sln.iml

11
Global/JetBrains.yml Normal file
View File

@ -0,0 +1,11 @@
aliases:
- IntelliJ
- RubyMine
- PhpStorm
- AppCode
- PyCharm
- CLion
- Android Studio
- WebStorm
- Rider
reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

View File

@ -1,7 +1,3 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## User settings ## User settings
xcuserdata/ xcuserdata/

3
Global/Xcode.yml Normal file
View File

@ -0,0 +1,3 @@
aliases:
- Objective-C
- Swift

2
Java.yml Normal file
View File

@ -0,0 +1,2 @@
aliases:
- Kotlin

View File

@ -1 +0,0 @@
Java.gitignore

2
Leiningen.yml Normal file
View File

@ -0,0 +1,2 @@
aliases:
- Clojure

View File

@ -1,63 +0,0 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/

3
Python.yml Normal file
View File

@ -0,0 +1,3 @@
editors:
- Global/JetBrains.gitignore
- Global/VisualStudioCode.gitignore

View File

@ -1,68 +0,0 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

View File

@ -286,10 +286,6 @@ paket-files/
# FAKE - F# Make # FAKE - F# Make
.fake/ .fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush # CodeRush
.cr/ .cr/

14
VisualStudio.yml Normal file
View File

@ -0,0 +1,14 @@
aliases:
- CSharp
- C#
- FSharp
- F#
- VisualBasic
- VB
editors:
- Global/JetBrains.gitignore
- Global/VisualStudioCode.gitignore
reviewers:
- Brendan Forster (@shiftkey)

74
docs/metadata.md Normal file
View File

@ -0,0 +1,74 @@
# Gitignore Metadata
This document outlines the additional metadata that can be associated with a gitignore template, and how tools can consume this metadata.
## Metadata Location
To add additional metadata to a gitignore template, add a new file to the same directory, with the matching name but ending in `yml`.
For example:
- for `C.gitignore` the associated metadata will be stored in `C.yml`
- for `Global/JetBrains.gitignore` the metadata file will be `Global/JetBrains.gitignore`
## Supported Fields
The structure of these files is still being settled upon, but for the moment these are some proposed entries.
#### `aliases`
Some templates can be used to represent a number of different situations, and rather than duplicating files on disk and needing to keep these in sync, we can store a list of these entries as metadata.
For example, JetBrains has a unified gitignore template that can be applied to all of their IDEs. Previously these were stored as comments in the header:
```
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
```
These values can be represented as metadata, so that tools consuming this repository can use these entries as matches if the user is searching for a specific product:
```yaml
aliases:
- IntelliJ
- RubyMine
- PhpStorm
- AppCode
- PyCharm
- CLion
- Android Studio
- WebStorm
- Rider
```
#### `editors`
There are a number of editors out there that support working with different languages. Rather than baking every editor's rules in every language that is supported, a list of additional templates that might be of interest
```yaml
editors:
- Global/JetBrains.gitignore
- Global/VisualStudioCode.gitignore
```
#### `reference`
Some ecosystems have up-to-date documentation about things that are necessary to exclude from version control. To associate this with a template, this could be stored as a key-value pair in metadata:
```yaml
reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
```
### `reviewers`
This element is inspired by the [`DefinitelyTyped`](https://github.com/DefinitelyTyped/DefinitelyTyped) project, allowing community members to opt-in to reviewing templates when a pull request is opened. This helps to share the review load and credit people who have been helpful with reviews.
```yaml
reviewers:
- @shiftkey
```
A friendly name can be provided alongside the GitHub account name.
```yaml
reviewers:
- Brendan Forster (@shiftkey)
```