JensKrumsieck/ChemSharp

View on GitHub

Showing 8 of 30 total issues

Method Execute has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void Execute(GeneratorExecutionContext context)
    {
        var formats = context.GetClassesImplementing("IAtomFileFormat").ToList();
        var sb = new StringBuilder(@"
        using System.IO;
Severity: Minor
Found in Generators/ChemSharp.Molecules.Generator/MoleculeCreateGenerator.cs - About 1 hr to fix

    Method CountElements has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static Dictionary<string, double> CountElements(this string formula, CultureInfo ci)
        {
            formula = formula.RemoveAbbreviations(); //remove special abbreviations
            var parse = RegexUtil.SumFormula.Matches(formula);
            var stack = new Stack<Dictionary<string, double>>();
    Severity: Minor
    Found in ChemSharp.Molecules/Extensions/SumFormulaUtil.cs - About 1 hr to fix

      Method ExportToString has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static string ExportToString(Spectrum spc, char separator,
                                              SpectrumExportFlags flags = SpectrumExportFlags.Experimental)
          {
              var exp = flags.HasFlag(SpectrumExportFlags.Experimental);
              var deriv = flags.HasFlag(SpectrumExportFlags.Derivative);
      Severity: Minor
      Found in ChemSharp.Spectroscopy/Export/CSVExporter.cs - About 1 hr to fix

        Method Export has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public override void Export(IExportable exportable, Stream stream)
            {
                base.Export(exportable, stream);
                if (Molecule == null) return;
                var atomsCount = Molecule.Atoms.Count;
        Severity: Minor
        Found in ChemSharp.Molecules/Export/PDBExporter.cs - About 1 hr to fix

          Method SetPickingIndicator has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private void SetPickingIndicator(ReadOnlySpan<char> line)
              {
                  //determine whether to check for atoms or bonds
                  if (line.StartsWith(AtomsBlock.AsSpan()))
                  {
          Severity: Minor
          Found in ChemSharp.Molecules/Formats/Mol2Format.cs - About 1 hr to fix

            Function addBond has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            export function addBond(x: number, y: number, z: number, qx: number, qy: number, qz: number, qw: number, length: number) {
            Severity: Major
            Found in ChemSharp.Molecules.Blazor/assets/src/index.ts - About 1 hr to fix

              Function addAtom has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export function addAtom(name: string, symbol: string, x: number, y: number, z: number, radius: number, color: string) {
              Severity: Major
              Found in ChemSharp.Molecules.Blazor/assets/src/index.ts - About 50 mins to fix

                Method ConversionMatrix has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static Matrix4x4 ConversionMatrix(float a, float b, float c, float alpha, float beta, float gamma)
                Severity: Minor
                Found in ChemSharp/Mathematics/FractionalCoordinates.cs - About 45 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language