Skip to content

Commit

Permalink
update with requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbale-altoros committed Jan 25, 2023
1 parent fdc962f commit a71a19a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- Lint rule for banning "console.sol" and "import hardhat or foundry console.sol" [#372](https://github.com/protofire/solhint/pull/372)

### Fixed
- Directories with .sol in the name path treated as files [#352]()
- Directories with .sol in the name path treated as files [#352](https://github.com/protofire/solhint/pull/388)

<br><br>
## [3.3.8] - 2023-01-17
Expand Down
6 changes: 2 additions & 4 deletions e2e/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,10 @@ describe('e2e', function() {
describe('.sol on path', function() {
useFixture('04-dotSol-on-path')

it('should success', function() {
const { code, stdout } = shell.exec('solhint contracts/**/*.sol')
it('should handle directory names that end with .sol', function() {
const { code } = shell.exec('solhint contracts/**/*.sol')

expect(code).to.equal(0)

console.log(stdout)
})
})
})
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function processFile(file, config) {
function processPath(path, config) {
const ignoreFilter = ignore({ allowRelativePaths: true }).add(config.excludedFiles)

const allFiles = glob.sync(path, {}).filter((f) => fs.lstatSync(f).isFile())
const allFiles = glob.sync(path, { nodir: true })
const files = ignoreFilter.filter(allFiles)

return files.map((curFile) => processFile(curFile, config))
Expand Down

0 comments on commit a71a19a

Please sign in to comment.