Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension Config can now take absolute path #328

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified build/distributions/cobol-check-0.2.8.zip
Binary file not shown.
195 changes: 0 additions & 195 deletions config.properties

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/linux_gnucobol_run_tests
Rune-Christensen marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/windows_gnucobol_run_tests.cmd
Rune-Christensen marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ private static String getCorrectRunContext(String path){
if (path.startsWith(".") && path.length() > 0){
path = path.substring(1);
}
if (path.length() > 0 && (path.startsWith("/") || path.substring(1,3).equals(":\\") || path.substring(1,3).equals(":/"))){
return StringHelper.adjustPathString(path);
}
return StringHelper.adjustPathString(PathHelper.endWithFileSeparator(runDirectory) + path);
}
return StringHelper.adjustPathString(path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class FileNameMatcher extends SimpleFileVisitor<Path> {
private boolean defaultToAllFiles = false;

public FileNameMatcher(String pattern) {
if (pattern.length() == 0) {
if (pattern.length() == 0 || pattern.equals("null")) {
defaultToAllFiles = true;
}
matcher = FileSystems.getDefault().getPathMatcher("glob:" + pattern);
Expand Down
6 changes: 5 additions & 1 deletion vs-code-extension/Cobol-check/config.properties
Rune-Christensen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ cobolcheck.decimalPointIsComma = false
cobolcheck.append.rules = null

#---------------------------------------------------------------------------------------------------------------------
# Path for the generated Cobol test code
# Path for the generated Cobol test code and the executeable file
# On Linux begin the path with a / to make it absolute and an x:\\ or x:/ to do he same on Windows.
# Default: ./
#---------------------------------------------------------------------------------------------------------------------
# cobolcheck.test.program.path = /home/myName/temp
# cobolcheck.test.program.path = c:\\Developer\\temp
# cobolcheck.test.program.path = c:/Developer/temp
cobolcheck.test.program.path = Cobol-check

#---------------------------------------------------------------------------------------------------------------------
Expand Down
12 changes: 8 additions & 4 deletions vs-code-extension/Cobol-check/default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ cobolcheck.decimalPointIsComma = false
cobolcheck.append.rules = null

#---------------------------------------------------------------------------------------------------------------------
# Path for the generated Cobol test code
# Path for the generated Cobol test code and the executeable file
# On Linux begin the path with a / to make it absolute and an x:\\ or x:/ to do he same on Windows.
# Default: ./
#---------------------------------------------------------------------------------------------------------------------
cobolcheck.test.program.path = Cobol-check
# cobolcheck.test.program.path = /home/myName/temp
# cobolcheck.test.program.path = c:\\Developer\\temp
# cobolcheck.test.program.path = c:/Developer/temp
cobolcheck.test.program.path = ./

#---------------------------------------------------------------------------------------------------------------------
# Suffix to append to the name of each program under test to produce the name of the corresponding
Expand All @@ -67,7 +71,7 @@ cobolcheck.test.program.name = CC##99.CBL
# Path for the generated testsuite parse error log
# Default: ./
#---------------------------------------------------------------------------------------------------------------------
testsuite.parser.error.log.path = Cobol-check
testsuite.parser.error.log.path = ./

#---------------------------------------------------------------------------------------------------------------------
# Name of the generated testsuite parse error log file - with extension
Expand Down Expand Up @@ -147,7 +151,7 @@ application.source.filename.suffix = CBL,cbl,COB,cob
# If application copybook filenames have a suffix, specify it here without the period or dot
# e.g. application.copybook.filename.suffix = CBL
#---------------------------------------------------------------------------------------------------------------------
application.copybook.filename.suffix = CBL,cbl,COB,cob
application.copybook.filename.suffix = CBL,cbl,COB,cob,CPY,cpy

#---------------------------------------------------------------------------------------------------------------------
# Optional override of system default Locale for log messages and exception messages.
Expand Down
Rune-Christensen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#
# GnuCOBOL 2.2 or later is installed and on the path. Its executable or alias or symlink is named "cobc".

cobc -x $@
cd "$(dirname $1)"
cobc -xj $@
name=$(echo "$1" | cut -f 1 -d '.')
"${name}"
"${name}"
Rune-Christensen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ rem
rem Assumptions:
rem
rem GnuCOBOL 3.+ is installed and on the path. Its executable or alias or symlink is named "cobc".

cobc -x %* && %~n1
%~d1
cd %~p1
cobc -xj %*
%~n1
Loading