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

To generate ignore list if necessary for downstream projects #296

Open
chfw opened this issue Jul 14, 2019 · 3 comments
Open

To generate ignore list if necessary for downstream projects #296

chfw opened this issue Jul 14, 2019 · 3 comments

Comments

@chfw
Copy link
Member

chfw commented Jul 14, 2019

#295

  1. ignore setup.py in flake8
@jayvdb
Copy link
Member

jayvdb commented Jul 15, 2019

This should be done by moban adding its targets matrix to the data seen by templates, so then templates can be written to exclude files which are targets. As it is a meta var, maybe a name like __targets__.

@chfw
Copy link
Member Author

chfw commented Jul 19, 2019

The key is allow the following target to know targets

targets:
   - lint.sh: lint.sh.jj2

There are two way of doing it and one reservation.

  1. as you mentioned, simple injection of targets into data would work
  2. Allow mobanfile to include data from arbitrary config files #126, there were thoughts about combine .moban.yml and project.yml into one. And coala achieved this by using 'overrides' keywords. To summarize, this approach will sove it too.

One reservation I have is: I am recently experimenting a new moban based project, which has interesting demands: the automatic injection of environment variable become an issue. Because the environment variable were not grouped under a key(by the way, I still support the idea that all env variables are not grouped, for most users so far, it is more friendly), and I need to find a way to cancel env variables. So, coming back to targets injection, I would try to remove 'auto' feature, to allow other projects to opt out targets injection.

@jayvdb
Copy link
Member

jayvdb commented Jul 19, 2019

If "targets" inject is as variable __targets__, projects which dont want it, do not need to use it. The restructure needed to create a __targets__ is needed for many reasons, and once restructured there is no added cost for putting the value in the data given to templates.

The coala approach is a horrible hack, and is needlessly complicated logic parsing the flexible targets: structure (and it doesnt work properly and it ignores copy:)

Re your env var problem : #300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants