Skip to content

[BUG]: Unable to pass Fortran linter #4755

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

Closed
2 tasks done
rreusser opened this issue Jan 14, 2025 · 0 comments
Closed
2 tasks done

[BUG]: Unable to pass Fortran linter #4755

rreusser opened this issue Jan 14, 2025 · 0 comments
Labels
Bug Something isn't working. Tools Issue or pull request related to project tooling.

Comments

@rreusser
Copy link
Member

rreusser commented Jan 14, 2025

Description

I am unable to get Fortran files to pass the linter. It complains "No final newline expected" whether or not there is a final newline. I have been locally removing insert_final_newline from Fortran editorconfig to get things to pass, but this only gets is passing locally and not on CI. See:

https://github.com/rreusser/stdlib/blob/f257760db466ba38810e4fbb9fde4826e21f64ee/.editorconfig#L85-L89

Related Issues

No.

Questions

No.

Demo

No response

Reproduction

Run the linter on a project file:


$ make lint-editorconfig-files FILES="lib/node_modules/@stdlib/blas/base/dscal/src/dscal.f"
Linting files for basic formatting errors...
lib/node_modules/@stdlib/blas/base/dscal/src/dscal.f:
	No final newline expected

1 errors found
make: *** [lint-editorconfig-files] Error 1

A screenshot of cat lib/node_modules/@stdlib/blas/base/dscal/src/dscal.f:

Image

The issue persists whether or not I add a newline. Maybe it's one of those Windows crlf things?

Expected Results

I expect the linter to pass since the file has no trailing newline.

Actual Results

Linter fails due to expecting no final newline.

Version

current develop

Environments

N/A

Browser Version

N/A

Node.js / npm Version

[email protected] / [email protected]

Platform

Mac OS 15.2

Checklist

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
@kgryte kgryte changed the title [BUG] Unable to pass Fortran linter [BUG]: Unable to pass Fortran linter Jan 15, 2025
@kgryte kgryte added Bug Something isn't working. Tools Issue or pull request related to project tooling. labels Jan 15, 2025
@kgryte kgryte closed this as completed in b8325c3 Jan 17, 2025
saurabhraghuvanshii pushed a commit to saurabhraghuvanshii/stdlib-gs that referenced this issue Jan 18, 2025
IIRC, we set this to `false` for historical reasons. Namely, old
Fortran was very sensitive about whitespace. However, we write
Fortran 95, which is "free-form". As such, I believe we can allow
inserting trailing newlines just fine. This makes Fortran
consistent with other file types throughout the project.

Closes: stdlib-js#4755

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
saurabhraghuvanshii pushed a commit to saurabhraghuvanshii/stdlib-gs that referenced this issue Jan 19, 2025
IIRC, we set this to `false` for historical reasons. Namely, old
Fortran was very sensitive about whitespace. However, we write
Fortran 95, which is "free-form". As such, I believe we can allow
inserting trailing newlines just fine. This makes Fortran
consistent with other file types throughout the project.

Closes: stdlib-js#4755

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
Neerajpathak07 pushed a commit to Neerajpathak07/stdlib that referenced this issue Jan 23, 2025
IIRC, we set this to `false` for historical reasons. Namely, old
Fortran was very sensitive about whitespace. However, we write
Fortran 95, which is "free-form". As such, I believe we can allow
inserting trailing newlines just fine. This makes Fortran
consistent with other file types throughout the project.

Closes: stdlib-js#4755

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
Vinit-Pandit pushed a commit to Vinit-Pandit/stdlibMine that referenced this issue Feb 4, 2025
IIRC, we set this to `false` for historical reasons. Namely, old
Fortran was very sensitive about whitespace. However, we write
Fortran 95, which is "free-form". As such, I believe we can allow
inserting trailing newlines just fine. This makes Fortran
consistent with other file types throughout the project.

Closes: stdlib-js#4755

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
ShabiShett07 pushed a commit to ShabiShett07/stdlib that referenced this issue Feb 26, 2025
IIRC, we set this to `false` for historical reasons. Namely, old
Fortran was very sensitive about whitespace. However, we write
Fortran 95, which is "free-form". As such, I believe we can allow
inserting trailing newlines just fine. This makes Fortran
consistent with other file types throughout the project.

Closes: stdlib-js#4755

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working. Tools Issue or pull request related to project tooling.
Projects
None yet
Development

No branches or pull requests

2 participants