Comments (5)
Hi Philipp,
You are right - it works when you just have one argument. I only used it together with ignore:
SQL> tvdformat C:/temp/test.sql ignore=C:/temp/ignore_format.txt
2023-03-21 14:19:43.536 SEVERE oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run java.base/java.lang.Class.cast(Class.java:3605)
java.lang.ClassCastException: Cannot cast java.lang.String to java.nio.file.Path
at java.base/java.lang.Class.cast(Class.java:3605)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$127$3280AAA$\^eval\_.isRelevantFile(<eval>:77)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$130$2444AAA$\^eval\_.getFiles(<eval>:61)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$131$28965A$\^eval\_.run(<eval>:685)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$60$31631AAA$\^eval\_.registerTvdFormat#handleEvent(<eval>:722)
at jdk.nashorn.javaadapters.oracle_dbtools_raptor_newscriptrunner_CommandListener.handleEvent(Unknown Source)
at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:439)
at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:237)
at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:356)
at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:239)
at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:1150)
at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.runSqlcl(SqlCli.java:1331)
at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:339)
The offending line is 76 where "file" as string is passed to ignoreMatcher.matches(file)
Cheers,
Plamen
from plsql-formatter-settings.
Hi @plamen-ppv
Thanks for reporting this. I was not able to reproduce it on my MacBook.
SQLcl: Release 22.4 Production on Tue Mar 21 12:24:16 2023
Copyright (c) 1982, 2023, Oracle. All rights reserved.
SQL> tvdformat /tmp/test.sql
Formatting file 1 of 1: /tmp/test.sql... done.
SQL>
Maybe it is platform specific. I have to test it on Windows.
from plsql-formatter-settings.
I tried tvdformat.jar on Windows 11 with Java17. Works as well:
java -jar tvdformat.jar c:\temp\test.sql xml=embedded arbori=default
Formatting file 1 of 1: c:\temp\test.sql... done.
from plsql-formatter-settings.
I tested it on Windows 10 with Java 11 and the latest SQLcl:
SQL> tvdformat c:\temp\test.sql
Formatting file 1 of 1: c:\temp\test.sql... done.
SQL> script format.js c:\temp\test.sql
Formatting file 1 of 1: c:\temp\test.sql... done.
SQL>
@plamen-ppv I cannot reproduce the problem. Could you please provide some details about your environment to make it reproducible?
from plsql-formatter-settings.
Thanks @plamen-ppv . I can reproduce it.
from plsql-formatter-settings.
Related Issues (20)
- formatting large files with repetitive statements, i.e. insert HOT 3
- noformat not working HOT 6
- Superb Script HOT 2
- Package constant formatting HOT 1
- Function header formatting: return deterministic HOT 1
- Support SQLDev 23.1.0 HOT 1
- Add - Formatierung "CASE WHEN" in SELECT statemen HOT 4
- Newlines being inserted into strings HOT 4
- Concatenation Bars being split apart invalidating strings HOT 2
- compiler flag concatenated to same line as end statement HOT 2
- Support SQLcl 23.3
- Do not reset Arbori program when importing trivadis_advanced_format.xml
- Unwanted line break after `whenever oserror` breaks code
- Wrong indentation in subqueries of with_clause in insert statements
- Unwanted line break before `on conversion error` in subquery
- spaces removed in grant statement
- Patching SQL Developer breaks Script Output tab feedback of direct SQL statement execution HOT 8
- Support SQLcl 23.4.0
- Can't export data after patch HOT 1
- Connection window is empty and not able to create any new database connection HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plsql-formatter-settings.