mybuddymichael / pgbot

A simple IRC bot, written in Clojure.
Other
18 stars 1 forks source link

Implement proactive advice on best practices #2

Open kevinmershon opened 10 years ago

kevinmershon commented 10 years ago

Warn developers in channel if their last commit contains violations of best practices (probably want some sort of configuration file to toggle warnings). Some examples would be committing on master, trailing whitespace, mixing tabs and spaces, and maybe even smarter stuff like correctly using language-based variable naming conventions (Clojure's dash-case, Ruby's snake_case, and Java's camelCase).

A proper warning would probably need to prefix the message with the developer's IRC alias, which would require the bot to 1) keep track of what alias(es) belong to what developer, and 2) verifying that they're in channel to receive the warning.

If they're not, you might either wish to delay warning them until they are, or ask the channel if that developer is using a new alias, or ask a specific developer in channel if they could bug the other developer to join the channel.

mybuddymichael commented 10 years ago

We'll probably need to POST the whole diff/patch, and then pgbot can deconstruct it for analysis. I'll need to think about how best to do that.

kevinmershon commented 10 years ago

It would probably be easier to either write a local python or ruby script for parsing diffs locally, or giving pgbot direct access to a repo.

mybuddymichael commented 10 years ago

We're already POSTing, so if we did that stuff server-side, all anyone would need to do is git pull on tools/. And I'd honestly rather do that in Clojure with a Java or Clojure library.

Seems like it'd be easier just to extend what we're already doing with diffs.

kevinmershon commented 10 years ago

You're right. Varying the communication model does make for an uglier design. Also, I totally get the desire to keep the app on a single language.