That leads to situation that people hacking things in plugins instead of extending/fixing core. Plugins usually copy-pasting examples from core (personally i copied as is jelly hacks and protected methods like getDefaultParamaeters from JobMixin) and that situation goes into loop. Imho core should be example for all project and not vice versa.
> On Oct 26, 2015, at 22:20, Stephen Connolly <[email protected]> > wrote: > > I think that the best way to do this is via an experiment in plugins... If we > get a critical mass of plugins adopting a mostly similar set of rules then > and only then should we think about applying them to core > > On Monday 26 October 2015, Kanstantsin Shautsou <[email protected] > <mailto:[email protected]>> wrote: >> On Oct 26, 2015, at 21:01, Jesse Glick <[email protected] >> <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: >> >> On Mon, Oct 26, 2015 at 12:44 PM, Kanstantsin Shautsou >> <[email protected] >> <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: >>>> I have never had any problem understanding anyone else’s code because of >>>> their formatting choices >>> >>> Because you know very well this code base >> >> How do you think I got to know (some of) the code base in the first >> place? By fixing problems, and digging through history to see when and >> why those problems were introduced. > I do the same, but last year unsquashed+normal PRs + more random made > everything worth. >> >>> See example of automated check >>> https://github.com/jenkinsci/envinject-plugin/pull/73#discussion_r40529580 >>> <https://github.com/jenkinsci/envinject-plugin/pull/73#discussion_r40529580> >> >> Interesting, though sounds very painful to contribute to since you >> must first file the PR, then go back and wait for the bot to ask you >> to reformat. Much better to be able to repeatedly run a style checker >> tool locally before committing. Not sure if there is any such tool >> which is able to automatically skip lines already present in the >> `master` branch or something like that. > - IDEA autoformat can be applied to selected block of code > https://www.jetbrains.com/idea/help/code-style-and-formatting.html > <https://www.jetbrains.com/idea/help/code-style-and-formatting.html> (not > exactly what you want, but sometimes helps) > - I don’t know any PRs that was accepted without changes. Default formatted > code usually fits into the most conservative styling. > - Rules can exist in checkstyle and be applied by any tool when it will > supported. > - Logically only during PR you can do all changes because after, `diff wall` > wouldn’t allow to touch committed code. It should not be so difficult to > fixup commits. > - The same pain as Update Centre filtering for plugins that doesn’t have link > to doc. You should release plugin, wait for metadata updates, debug all chain > and only then understand what happened. But such not obvious flow was > accepted for all 1k plugins. It even can’t say to email that something wrong. > - Local run will require huge amount of time and people always forgetting to > run checks. PR is the only place where we can point to such things. > - Also comments in PR can be ignored ;) > >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Developers" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-dev/8fjvXGYbFJ4/unsubscribe >> <https://groups.google.com/d/topic/jenkinsci-dev/8fjvXGYbFJ4/unsubscribe>. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] >> <javascript:_e(%7B%7D,'cvml','jenkinsci-dev%[email protected]');>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2W0x5Q2NTAaZMQz4G5nvP9-6XTLKbTxP9VkFSvQML%2BvA%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2W0x5Q2NTAaZMQz4G5nvP9-6XTLKbTxP9VkFSvQML%2BvA%40mail.gmail.com>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','jenkinsci-dev%[email protected]');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/D4B215A1-C73A-44A1-A04E-D9195C1F9325%40gmail.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/D4B215A1-C73A-44A1-A04E-D9195C1F9325%40gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > > -- > Sent from my phone > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/8fjvXGYbFJ4/unsubscribe > <https://groups.google.com/d/topic/jenkinsci-dev/8fjvXGYbFJ4/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMx93kpHmwJyjLmBe-pmKTzC5haH%3DbGrca-3UqZMfegiug%40mail.gmail.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMx93kpHmwJyjLmBe-pmKTzC5haH%3DbGrca-3UqZMfegiug%40mail.gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/264DD823-92E1-4C43-98E4-AFD73FDE44AF%40gmail.com. For more options, visit https://groups.google.com/d/optout.
