Skip to main content
8 votes

Should I be enforcing lint rules on feature branches?

I would 100% save this for pushes to a shared branch, e.g. Main or Development. In my experience, pushing half-finished code (to ones OWN branch) is a very common thing to do for situations such as ...
Richard KeMiKaL GeNeRaL Denton's user avatar
6 votes

What is the best way to run untrusted hooks/plugins?

If you do not trust the code, do not execute it - period. If you wish to trust the code. Constrain what is permitted as code reject specific operations such as eval(...) reject unbounded loops reject ...
Kain0_0's user avatar
  • 16.6k
6 votes

Should I be enforcing lint rules on feature branches?

I don't understand the argument against applying linting and static analysis to every commit on a shared branch. Since shared branches typically live in a remote environment (often GitHub, GitLab, or ...
Thomas Owens's user avatar
  • 85.9k
3 votes

Should I be enforcing lint rules on feature branches?

It goes back to the perennial question about what a developer's preferred Git workflow should be and what a commit should be: Is a commit an atomic unit of work - something that you can examine in ...
Josh Kelley's user avatar
  • 11.2k
3 votes
Accepted

What is the best way to run untrusted hooks/plugins?

Python has no security model that would allow you to safely execute untrusted code. If you want to execute untrusted Python code you need to apply operating system level safety measures, for example ...
amon's user avatar
  • 136k
3 votes
Accepted

Is using Microsoft Hooks an ethical process for getting non sensitive Information

Microsoft Windows is built around hooks. Most of them are hidden behind their api but once your application becomes anything more then trivial you can't get around using hooks once in a while. It's ...
Pieter B's user avatar
  • 13.3k
2 votes

Is it possible to run a git hook that is executed when adding a file?

Unfortunately, there is not. However, there is a workaround. Git lets you filter files before staging (and before checkout), if needed. You can hook right there. See the filter section in the docs ...
tkausl's user avatar
  • 609
1 vote

Should I be enforcing lint rules on feature branches?

I’d say it’s the wrong question. You can, if you wish to do so, make any checks when code is shared . With a decent compiler that works quite well even without an enforced lint. The question then is: ...
gnasher729's user avatar
  • 49.4k
1 vote

Is it a good practice to run unit tests in version control hooks?

Broken commits should not be allowed on trunk, because trunk is what may go into production. So you need to ensure there is a gateway they need to pass before being on trunk. However, broken commits ...
tkruse's user avatar
  • 276

Only top scored, non community-wiki answers of a minimum length are eligible