Added arcanist linters and cleaned errors and warnings

Arcanist (arc) will now always run linters before uploading any new
  commit to Phabricator. All errors/warnings (or their absence) will be
  shown in the web interface together with a explanation by the commiter
  (arcanist will ask the commiter if the build was not clean).

  The linters include:
    - clang-format
    - spelling check
    - permissions check (aka. chmod)
    - filename check
    - merge conflict marker check
  Note, that their scope is sometimes limited (see .arclint for
  details).

  This commit also fixes all errors and warnings these linters reported,
  namely:
    - spelling mistakes and typos
    - executable permissions for various text files

Differential Revision: http://reviews.llvm.org/D4916

llvm-svn: 215871
This commit is contained in:
Johannes Doerfert 2014-08-18 00:40:13 +00:00
parent 6230691c91
commit 9e7b17b0d4
12 changed files with 42 additions and 17 deletions

View File

@ -1,4 +1,6 @@
{
"project_id" : "polly",
"conduit_uri" : "http://reviews.llvm.org/"
"conduit_uri" : "http://reviews.llvm.org/",
"linter.scriptandregex.script": "sh -c './utils/check_format.sh \"$0\" 2> /dev/null || true'",
"linter.scriptandregex.regex": "/^(OK:(?P<ignore>.+)|Error:) (?P<message>.+)$/m"
}

23
polly/.arclint Normal file
View File

@ -0,0 +1,23 @@
{
"linters": {
"format": {
"include": "(include/polly/.+\\.h$|lib/.+\\.cpp$)",
"exclude": "(lib/JSON/.*)",
"type": "script-and-regex"
},
"chmod": {
"type": "chmod"
},
"filename": {
"exclude": "(www/experiments/.+|.*\\.jscop.*)",
"type": "filename"
},
"merge-conflict": {
"type": "merge-conflict"
},
"spelling": {
"exclude": "(configure|autoconf/.*)",
"type": "spelling"
}
}
}

View File

@ -12,7 +12,7 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
#FileCheck is not install by default, warn the user to Copy FileCheck
if( NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/FileCheck
OR NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/not)
message(WARNING "FileCheck or not are requred by running regress tests, "
message(WARNING "FileCheck or not are required by running regress tests, "
"but they are not installed! Please copy it to "
"${LLVM_INSTALL_ROOT}/bin.")
endif(NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/FileCheck

View File

@ -11,7 +11,7 @@ dnl Tell autoconf that this is an LLVM project being configured
dnl This provides the --with-llvmsrc and --with-llvmobj options
LLVM_CONFIG_PROJECT($LLVM_SRC_ROOT,$LLVM_OBJ_ROOT)
dnl Tell autoconf that the auxilliary files are actually located in
dnl Tell autoconf that the auxiliary files are actually located in
dnl the LLVM autoconf directory, not here.
AC_CONFIG_AUX_DIR($LLVM_SRC/autoconf)

View File

@ -6,7 +6,7 @@ AC_INIT([Polly],[0.01],[etherzhhb@gmail.com grosser@fim.uni-passau.de ojomojo@gm
dnl Identify where LLVM source tree is
LLVM_SRC_ROOT="../.."
LLVM_OBJ_ROOT="../.."
dnl Tell autoconf that the auxilliary files are actually located in
dnl Tell autoconf that the auxiliary files are actually located in
dnl the LLVM autoconf directory, not here.
AC_CONFIG_AUX_DIR($LLVM_SRC_ROOT/autoconf)

View File

@ -55,7 +55,7 @@ using namespace polly;
STATISTIC(ScopFound, "Number of valid Scops");
STATISTIC(RichScopFound, "Number of Scops containing a loop");
// Multiplicative reductions can be disabled seperately as these kind of
// Multiplicative reductions can be disabled separately as these kind of
// operations can overflow easily. Additive reductions and bit operations
// are in contrast pretty stable.
static cl::opt<bool> DisableMultiplicativeReductions(

View File

@ -617,7 +617,7 @@ namespace Json {
/** \brief A linked page based hash-table implementation used internally by Value.
* \internal ValueInternalMap is a tradional bucket based hash-table, with a linked
* list in each bucket to handle collision. There is an addional twist in that
* list in each bucket to handle collision. There is an additional twist in that
* each node of the collision linked list is a page containing a fixed amount of
* value. This provides a better compromise between memory usage and speed.
*

View File

@ -23,7 +23,7 @@ namespace Json {
/** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
*
* The JSON document is written in a single line. It is not intended for 'human' consumption,
* but may be usefull to support feature such as RPC where bandwith is limited.
* but may be useful to support feature such as RPC where bandwidth is limited.
* \sa Reader, Value
*/
class JSON_API FastWriter : public Writer

View File

@ -18,7 +18,7 @@
// variables. Such variables are generated before scop detection and
// also before the code preparation pass. All PHI nodes that are not canonical
// induction variables are not supported by the indvars based code generation
// and are consequently translated into explict memory accesses.
// and are consequently translated into explicit memory accesses.
//
// - scev based code generation:
//

View File

@ -91,7 +91,7 @@ for.end30: ; preds = %for.cond10
; CHECK: }
; CHECK: }
; This check makes sure CLooG stops splitting for ambigious schedules as
; This check makes sure CLooG stops splitting for ambiguous schedules as
; they may be generated by the isl/PoCC/Pluto schedule optimizers.
;
; Previously we created such code:

View File

@ -14,7 +14,7 @@ OK=0
for ARG in "$@"
do
${CLANG_FORMAT} $ARG | diff -u $ARG -
${CLANG_FORMAT} -style=llvm $ARG | diff -u $ARG - >&2
if [[ $? -eq 1 ]]; then
OK=1

View File

@ -39,7 +39,7 @@ var VideoJS = JRClass.extend({
this.video = element;
}
// Store reference to player on the video element.
// So you can acess the player later: document.getElementById("video_id").player.play();
// So you can access the player later: document.getElementById("video_id").player.play();
this.video.player = this;
this.values = {}; // Cache video values.
this.elements = {}; // Store refs to controls elements.
@ -456,7 +456,7 @@ VideoJS.player.extend({
this.canPlaySourceResult = false;
return false;
},
// Check if the extention is compatible, for when type won't work
// Check if the extension is compatible, for when type won't work
canPlayExt: function(src){
if (!src) { return ""; }
var match = src.match(/\.([^\.]+)$/);
@ -1290,10 +1290,10 @@ VideoJS.player.newBehavior("currentTimeScrubber", function(element){
_V_.addListener(document, "mousemove", this.onCurrentTimeScrubberMouseMove.rEvtContext(this));
_V_.addListener(document, "mouseup", this.onCurrentTimeScrubberMouseUp.rEvtContext(this));
},
onCurrentTimeScrubberMouseMove: function(event){ // Removeable
onCurrentTimeScrubberMouseMove: function(event){ // Removable
this.setCurrentTimeWithScrubber(event);
},
onCurrentTimeScrubberMouseUp: function(event){ // Removeable
onCurrentTimeScrubberMouseUp: function(event){ // Removable
_V_.unblockTextSelection();
document.removeEventListener("mousemove", this.onCurrentTimeScrubberMouseMove, false);
document.removeEventListener("mouseup", this.onCurrentTimeScrubberMouseUp, false);
@ -1385,11 +1385,11 @@ VideoJS.player.newBehavior("fullscreenToggle", function(element){
}
},
fullscreenOnWindowResize: function(event){ // Removeable
fullscreenOnWindowResize: function(event){ // Removable
this.positionControlBars();
},
// Create listener for esc key while in full screen mode
fullscreenOnEscKey: function(event){ // Removeable
fullscreenOnEscKey: function(event){ // Removable
if (event.keyCode == 27) {
this.exitFullScreen();
}
@ -1718,7 +1718,7 @@ Function.prototype.evtContext = function(obj){
return temp;
};
// Removeable Event listener with Context
// Removable Event listener with Context
// Replaces the original function with a version that has context
// So it can be removed using the original function name.
// In order to work, a version of the function must already exist in the player/prototype