Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

bug when using format.js with a single file #243

@plamen-ppv

Description

@plamen-ppv

Hi Philip!

Thanks for providing such a nice tool for formatting SQL from within SQLcl!
I've been using it n SQLcl 22.4 and it works fine.

... but I found one bug:
if you run it with a single file instead of directory, i.e.
tvdformat c:\temp\x.sql xml=....
then the call from getFiles() to isRelevantFile() fails with Java type cast error - line 60 in format.js.
It's a very easy fix:
from
if (isRelevantFile(rootPath, extensions, ignoreMatcher)) {
to
if (isRelevantFile(javaPaths.get(rootPath), extensions, ignoreMatcher)) {

Best regards,
Plamen

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions