Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #14558: Monitors get lost when calling mc_issue_update via SOAP
- Loading branch information
Showing
2 changed files
with
46 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the // line comments, but not our conventions
http://www.mantisbt.org/guidelines.php
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't get me wrong.
Maybe we should change some of the rules because they don't make sense.
There are hundreds of // in existing code.
At the moment it's even possible to introduce a runtime syntax error
in a stable version by a wrong commit.
So introducing a "wrong" comment isn't really a problem compared to this.
Rules should be checked as early as possible when developing
As long as we don't check anything, there will always occur commits that
brake rules.
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestions: yes, enough time to implement: No :-(
A very very small start: A script which could run in nightly build to avoid syntax errors in delivery: https://github.com/atrol/Tools/blob/master/bin/check_php_syntax.sh
This is the right tool to check violations of coding standards: http://pear.php.net/package/PHP_CodeSniffer
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The smartest way of doing this, would be to use a pre-commit hook that would take care of e.g. automatic syntax check of php files, and any other tasks we might want to define.
However, the hooks are not distributed and installed automatically - it is the individual responsibility of each developer to set things up (quote from git-scm book: "hooks aren’t transferred with a clone of a project, you must distribute these scripts some other way and then have your users copy them to their .git/hooks directory and make them executable.")
For even more strict control, a pre-receive hook would be even better, but that is not supported by github.
Setting up a job on the server may also be an option, making the checks a part of the nightly build script would be best I think.
git hooks reference: http://git-scm.com/book/en/Customizing-Git-Git-Hooks
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look at CodeSniffer docs and it looks like a good tool, but seems like a lot of work to set up the "sniffs" to match our standards, especially considering that "Most of the sniffs written for PHP_CodeSniffer do not support the usage of tabs for indentation and alignment. You can write your own sniffs that check for tabs instead of spaces" (see http://pear.php.net/manual/en/package.php.php-codesniffer.advanced-usage.php)
Maybe we should consider to revise our standards ;-)
And maybe we should move this discussion to the mailing list.
05f7c33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll recommend CodeSniffer for PHP language. I'm using this solution since three years in four companies - we need use consequent coding method.