-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
16 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python3 | ||
##################################################################### | ||
# This script checks mo and mos files for invalid syntax. | ||
# Run this file before checking changes into the trunk. | ||
# | ||
# [email protected] 2011-03-06 | ||
##################################################################### | ||
import os, string, fnmatch, os.path, sys | ||
# -------------------------- | ||
# Global settings | ||
LIBHOME=os.path.abspath(".") | ||
LIBHOME=os.path.join(".") | ||
|
||
# List of invalid strings | ||
# Regarding the strings __Dymola_*, see https://trac.modelica.org/Modelica/ticket/786 | ||
# for possible replacements. | ||
INVALID_IN_ALL=["fixme", "import \"", | ||
"import Buildings;", | ||
"import IBPSA;", | ||
"<h1", "<h2", "<h3", "todo", "xxx", "tt>", "<--", | ||
"realString", "integerString", "structurallyIncomplete", | ||
"preferedView", "Algorithm=", "Diagram,", "DocumentationClass", | ||
|
@@ -37,7 +37,12 @@ | |
"__Dymola_normallyConstant", | ||
"__Dymola_NumberOfIntervals", | ||
"__Dymola_saveSelector", | ||
"__Dymola_Text"] | ||
"__Dymola_Text", | ||
"modelica://AixLib", | ||
"modelica://IBPSA", | ||
"modelica://BuildingSystems", | ||
"modelica://IDEAS", | ||
"modelica://https://"] | ||
# List of invalid strings in .mos files | ||
INVALID_IN_MOS=[] | ||
# List of invalid regular expressions in .mo files | ||
|
@@ -47,7 +52,7 @@ | |
|
||
######################################################### | ||
def reportError(message): | ||
print "*** Error: ", message | ||
print("*** Error: ", message) | ||
global IERR | ||
IERR=IERR+1 | ||
|
||
|
@@ -153,5 +158,5 @@ def reportErrorIfMissing(fileName, listOfStrings): | |
# Terminate if there was an error. | ||
# This allows other scripts to check the return value | ||
if IERR != 0: | ||
print "*** Terminating due to found errors in examined files." | ||
sys.exit(2) | ||
print("*** Terminating due to found errors in examined files.") | ||
sys.exit(1) |