ExtremeFLOW / neko

/ᐠ. 。.ᐟ\ᵐᵉᵒʷˎˊ˗
https://neko.cfd/
Other
174 stars 32 forks source link

Known linter issues #1405

Open timfelle opened 3 months ago

timfelle commented 3 months ago

Test strings:

if (axis /= 'x' .and. axis /= 'y' .and. axis /= 'z') then 
if (n_points <= 0) then  
write(header_line, '(I0,A,I0)') this%n_global_probes, ",", this%n_fields
header_line = trim(header_line) // "," // trim(this%which_fields(i))
write(log_buf, '(A5,"(",F10.6,",",F10.6,",",F10.6,")")') & 
real(kind=rp), intent(inout) :: phis(n)
   &please use that data structure instead.')  
    if (pe_rank .ne. 0) allocate(character(len=integer_val)::json_buffer)  
MartinKarp commented 2 months ago

It might just be me, maybe I installed the wrong version, but the options of flint that I have locally are: config, dump, score, and tree.

So when I run flint lint I get an error.

My flinter is located in:

$ whereis flint
flint: /home/martin/anaconda3/bin/flint

and my version should be

$ conda list flint
# packages in environment at /home/martin/anaconda3:
#
# Name                    Version                   Build  Channel
flinter                   0.4.0                    pypi_0    pypi
timfelle commented 2 months ago

Yes, if you look at the CI you will see that we actually use 2 different versions of flint.

The latest Flint crashes with some of the complex recursive structures in the stack and htable. Therefore we use version 0.4.0 to score the entire repository.

We use the latest Flint to lint all the changed files, since the output is a lot more readable than 0.4.0.

If you upgrade your flint then the lint command will work. Otherwise I seem to recall that you need to use dump for 0.4.0, since score only works for directories I think.

MartinKarp commented 2 months ago

Thanks! How should we do with the docs you think? Right now its 0.4.0, but lint would be more helpful for contributors.