I have a project which tree structure looks like this:
+ /Root
- .gitignore
+ - - /Folder A
- - - .gitignore <--- this fellow
+ - - - /bin
- - - - - fileA
+ - - - - fileB
+ - - - /Folder AA
+ - - /FolderB
+ - - - /bin
...
The .gitignore in the root-folder has a lot of rules, among them is to ignore all /bin-folders.
However, in my FolderA I would like everything to stay as it is - all the way down in that folder.
FolderB/bin on the other hand should be ignored.
I know this is possible by adding another .gitignore in FolderA, and let this override the root folder's .gitignore. But I can't remember how.
What should I write in FolderA/.gitignore?
Edit:
In other words: "FolderA is a sacred folder, and must have all files in it stay in it, disregarding what any other .gitignore-files must say"
Override the root .gitignore in /FolderA/.gitignore using the include syntax:
!file_that_should_not_be_ignored
!folder_that_should_not_be_ignored
Solution found:
In the .gitignore file added in the folder needed to be excluded, the following line is added as the only line:
!*/
Related
I have the native static lib that has a few .h files as API, the dir structure looks like this
3rdParties -
- MyAPIHeader.h
- my.modulemap
my modulemap file looks like this
module MyAPIHeader {
header "MyAPIHeader.h"
export *
}
and everything works well, up until I need to add another API file to my modulemap structure that does not reside in the same dir.
anotherProjectDir -
- AnotherAPIHeader.h
3rdParties -
- MyAPIHeader.h
- my.modulemap
and my modulemap file looks like this
module MyAPIHeader {
header "MyAPIHeader.h"
export *
}
module AnotherAPIHeader {
header "AnotherAPIHeader.h"
export *
}
and then when I try to use AnotherAPIHeader functions, I got such an error in the modulemap file
Header 'AnotherAPIHeader.h' not found
I tried to set the path to the .h file in the module map as relative (not works) then I tried to set the path to the header file in the target (not works).
To sum up - when the .h file that is included in the module map resides in the same dir as a module map it works, when .h file resides in the other dir there is no way to set relative dir to that .h file.
What am I missing?
I think what you are looking for is an umbrella header. They basically allow you to specify what headers you want in a module. Here is a site explaining them.
Currently I do this:
configMapGenerator:
- name: sql-config-map
files:
- "someDirectory/one.sql"
- "someDirectory/two.sql"
- "someDirectory/three.sql"
and I would like to do sth. like this:
configMapGenerator:
- name: sql-config-map
files:
- "someDirectory/*.sql"
Is this somehow possible?
Nope.
See discussion around that feature in comment on "configMapGenerator should allow directories as input"
The main reason:
To move towards explicit dependency declaration, we're moving away from allowing globs in the kustomization file
This command works fine and will edit your kustomization.yaml:
kustomize edit add configmap my-configmap --from-file="$PWD/my-files/*"
The my-files directory has to be in the same folder that the kustomization.yaml file.
I have few questions about cascading eslint config file:
Can I use eslint like a tsconfig.json (in typescript) where I have a root .eslintrc.yml and I can extend/cascade that to each .eslintrc.yml for each folder (project)? I'm not sure if this is what the documentation says here.
If I can extend a root config file how does it work on the case of extends option where sometimes the order is important like on the case of eslint-config-prettier as mentioned on their docs. There it says:
Make sure to put it last, so it gets the chance to override other configs.
Correct me if my understanding is correct that with plugins option the order is not important but on extends sometimes the order is important like what I mentioned on question #2.
If the order is important on extends option, how can I make sure that it follows the order when I have an extension like eslint-plugin-prettier where it should be the last when I'm not using cascading. For example:
If I'm not using cascading it should be like this as what is mentioned here:
extends:
- "some-other-config-you-use"
- "prettier"
- "prettier/#typescript-eslint"
- "prettier/react"
If I'm using cascading my setup will be like this:
# root
root: true
parser: "#typescript-eslint/parser"
extends:
- "eslint:recommended"
- "plugin:#typescript-eslint/recommended"
- "prettier"
- "prettier/#typescript-eslint"
# sub-folder
env:
browser: true
extends:
- "plugins:react/recommended"
- "plugins:jsx-a11y/recommended"
- "prettier/react"
root: true
parser: "#typescript-eslint/parser"
extends:
- "eslint:recommended"
- "plugin:#typescript-eslint/recommended"
- “./path/your_other_config”
- "prettier"
- "prettier/#typescript-eslint"
Related to this, I was running into an error after creating the .eslintrc.js file in a subdirectory:
Parsing error: "parserOptions.project" has been set for #typescript-eslint/parser.
The file does not match your project config
The solution was to specify ignorePatterns: ['.eslintrc.js'], in the root config, as discussed here.
I have a multi-module SBT project that writes sources to the unmanagedSourceDirectories during the first module and then subsequently uses the contents during later modules (this process repeats). The project structure looks like this:
root
+ gen - writes content to useA/target/generated-sources
+ useA - writes content to useB/target/generated-sources
+ useB - writes content to useC/target/generated-sources
+ etc....
The unmanagedSourceDirectories are defined as the following
root
+ gen
+ useA - unmanagedSourceDirectories=useA/target/generated-sources
+ useB - unmanagedSourceDirectories=useB/target/generated-sources
+ etc...
Is there any way to achieve what I am looking for?
I would like to create below folder structure in git in order to organise my projects better.
Dojo (root)
- proj/repo 1
- proj/repo 2
Node (root)
- proj/repo 1
- proj/repo 2
- proj/repo 3
Is it feasible?