# Julia editor that flags anomalous code?

**URL:** <https://discourse.julialang.org/t/julia-editor-that-flags-anomalous-code/116001>\
**Category:** General Usage\
**Created:** [June 22, 2024, 1:04am UTC](https://discourse.julialang.org/t/julia-editor-that-flags-anomalous-code/116001 "2024-06-22T01:04:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Vavasis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephen_vavasis/32/3389_2.png) [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Post date:** [June 22, 2024, 1:04am UTC](https://discourse.julialang.org/t/julia-editor-that-flags-anomalous-code/116001/1 "2024-06-22T01:04:39Z")

</div>

Consider the following code, which contains two anomalies:

```julia
function t1(n)
    x = n
    x = 5
    for i = 1 : x
        for i = 1 : x
            println("i = ", i)
        end
    end
end

```

The anomalies are: the first assignment to `x` is useless, and the subscript `i` is nested in a for-loop that is already over `i`. The Matlab code editor issues warnings about both of these anomalies in the analogous Matlab function, and these warnings have saved me much time over the years that would otherwise have been spent on debugging. Is there a Julia code editor that identifies suspicious code like this?
