moremoban/moban

To generate ignore list if necessary for downstream projects

chfw opened this issue · 3 comments

chfw commented

#295

  1. ignore setup.py in flake8

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 commented

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. #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.

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