mercredi 12 août 2020

python linter that enforces code change on a condiotion

I'm looking for a way(linter, git option etc) to enable something in the spirit of the following semantics:

# if_change_this_than_change_that(some_tag)
some code
# end_if_change_this_than_change_that

#tag(some_tag)
some code
#end_tag

I would like the tool to validate that if I'm changing the first section of code, than the tagged section of code must be changed as well.

I'm interested to do so in order to prevent editing code in one place that might brake some other related code, possibly in a different service\file\module (but in the same code repo) without the developer explicitly changing the effected code, this is due to code dependencies that might be hard for example to check in tests.

specifically I would like to achieve this in Python and possibly also C++

Aucun commentaire:

Enregistrer un commentaire