Scripts are edited when they are not open

I get this error message (see screenshot 1) whenever I open my Unity Projects.

Apparently I have a script (EnumerableTestMethodCommand.cs) that is incomplete (see blockquote).

    {
        var revealLabel = this.revealLabel;

        if (revealLabel != revealedLabel) {
            Reposition();
        }

        revealedLabel = revealLabel;
    }

    protected override bool dim {
        get {
            var dim = BoltCore.Configuration.dimInactiveNodes && !(transition.source.Analysis<StateAnalysis>(context).isEntered && analysis.isTraversed);

            if (isMouseOver || isSelected) {
                dim = false;
            }

            return dim;
        }
    }

    public override void DrawForeground() {
        BeginDim();

        base.DrawForeground();

        GUI.Label(iconPosition, label, Styles.eventIcon);

        GUI.BeginClip(clipPosition);

        GUI.Label(labelInnerPosition, label, invertForeground ? Styles.labelInverted : Styles.label);

        GUI.EndClip();

        EndDim();

        CheckReveal();
    }

    public override void DrawBackground() {
        BeginDim();

        base.DrawBackground();

        DrawConnection();

        if (showDroplets) {
            DrawDroplets();
        }

        EndDim();
    }

    private void DrawConnection() {
        GraphGUI.DrawConnectionArrow(Color.white, sourceEdgeCenter, entryEdgeCenter, sourceEdge, entryEdge, relativeBend, minBend);

        if (BoltState.Configuration.transitionsEndArrow) {
            GraphGUI.DrawConnectionArrow(Color.white, exitEdgeCenter, destinationEdgeCenter, exitEdge, destinationEdge, relativeBend, minBend);
        } else {
            GraphGUI.DrawConnection(Color.white, exitEdgeCenter, destinationEdgeCenter, exitEdge, destinationEdge, null, Vector2.zero, relativeBend, minBend);
        }
    }
    #endregion

    #region Selecting
    public override bool canSelect => true;
    #endregion

    #region Dragging
    public override bool canDrag => false;

    protected override bool snapToGrid => false;
    #endregion

    #region Deleting
    public override bool canDelete => true;
    #endregion

    #region Droplets
    private readonly List<float> droplets = new List<float>();

    private float dropTime;

    private float lastBranchTime;

    protected virtual bool showDroplets => BoltState.Configuration.animateTransitions;

    protected virtual Vector2 GetDropletSize() {
        return BoltFlow.Icons.valuePortConnected?[12].Size() ?? 12 * Vector2.one;
    }

    protected virtual void DrawDroplet(Rect position) {
        GUI.DrawTexture(position, BoltFlow.Icons.valuePortConnected?[12]);
    }

    private void DrawDroplets() {
        foreach (var droplet in droplets) {
            Vector2 position;

            if (droplet < 0.5f) {
                var t = droplet / 0.5f;
                position = GraphGUI.GetPointOnConnection(t, sourceEdgeCenter, entryEdgeCenter, sourceEdge, entryEdge, relativeBend, minBend);
            } else {
                var t = (droplet - 0.5f) / 0.5f;
                position = GraphGUI.GetPointOnConnection(t, exitEdgeCenter, destinationEdgeCenter, exitEdge, destinationEdge, relativeBend, minBend);
            }

            var size = GetDropletSize();

            using (LudiqGUI.color.Override(Color.white)) {
                DrawDroplet(new Rect(position.x - size.x / 2, position.y - size.y / 2, size.x, size.y));
            }
        }
    }
    #endregion

    public static class Styles {
        static Styles() {
            label = new GUIStyle(BoltCore.Styles.nodeLabel);
            label.alignment = TextAnchor.MiddleCenter;
            label.imagePosition = ImagePosition.TextOnly;

            labelInverted = new GUIStyle(label);
            labelInverted.normal.textColor = ColorPalett

Anyway, I navigate to the script that is the issue, fix the problem by copy-pasting the correct code from a friends project. But then upon closing the script, another file (PrimitiveVectorDrawer.cs) is now the problem (see screenshot 2).

I fix this issue the same way as with the first one, but now the first mentioned script (EnumerableTestMethodCommand.cs) has been edited and the error messages from screenshot 1 is back. It goes back and forth like this forever :confused: