Badgerati/Edison

View on GitHub

Showing 215 of 215 total issues

Method Run has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public void Run()
        {
            while (!(_interrupted && Count == 0))
            {
                // if there's nothing to send, sleep for a little
Severity: Minor
Found in Edison.Engine/Threading/ResultCalloutThread.cs - About 1 hr to fix

    Method SolutionValidator has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private void SolutionValidator(EdisonContext context)
            {
                // solution is optional, so if not passed skip validation
                if (string.IsNullOrWhiteSpace(context.Solution))
                {
    Severity: Minor
    Found in Edison.Engine/Validators/AssemblyValidator.cs - About 1 hr to fix

      Method Get has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public dynamic Get(HtmlIdentifierType identifierType, string identifier)
              {
                  if (Explorer.Document == null)
                  {
                      throw new NullReferenceException("Browser object has no Document available for querying");
      Severity: Minor
      Found in Edison.Framework/Browsers/Browser.cs - About 1 hr to fix

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

                private void SetProgress(int progress)
                {
                    if (TestProgressBar.IsDisposed)
                    {
                        return;
        Severity: Minor
        Found in Edison.GUI/Form1.cs - About 1 hr to fix

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

                  private void EdisonContext_OnTestResult(ETestResult result)
                  {
                      switch (result.AbsoluteState)
                      {
                          case TestResultAbsoluteState.Ignored:
          Severity: Minor
          Found in Edison.TestDriven/TestRunner.cs - About 1 hr to fix

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

                    private string GetParameters(object[] parameters)
                    {
                        var _parameters = new StringBuilder();
            
                        // If there are no parameters, just return empty
            Severity: Minor
            Found in Edison.Framework/Results/TestResult.cs - About 1 hr to fix

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

                      private void WriteResultsToFile()
                      {
                          if (DisableFileOutput)
                          {
                              Logger.Instance.WriteMessage("Output file creation disabled");
              Severity: Minor
              Found in Edison.Engine/Contexts/EdisonContext.cs - About 1 hr to fix

                Method AddFailedTestResult has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private void AddFailedTestResult(TestResult result)
                        {
                            if (result.State == TestResultState.Success)
                            {
                                return;
                Severity: Minor
                Found in Edison.GUI/Form1.cs - About 1 hr to fix

                  Method GetCategories has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public IEnumerable<string> GetCategories(
                              Assembly assembly,
                              IEnumerable<MethodInfo> tests = default(IEnumerable<MethodInfo>),
                              IEnumerable<Type> fixtures = default(IEnumerable<Type>))
                          {
                  Severity: Minor
                  Found in Edison.Engine/Repositories/AssemblyRepository.cs - About 1 hr to fix

                    Method ValidateUrl has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public static bool ValidateUrl(string url)
                            {            
                                try
                                {
                                    var urlNoParams = (new Uri(url)).GetLeftPart(UriPartial.Path);
                    Severity: Minor
                    Found in Edison.Framework/Browsers/BrowserHelper.cs - About 1 hr to fix

                      Method Validate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public void Validate(EdisonContext context)
                              {
                                  // only validate if we have a URL supplied
                                  if (string.IsNullOrWhiteSpace(context.TestResultURL))
                                  {
                      Severity: Minor
                      Found in Edison.Engine/Validators/TestResultUrlValidator.cs - About 1 hr to fix

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                public virtual IAssert AreTimesEqual(TimeSpan expected, TimeSpan actual, TimeSpan offset = default(TimeSpan), string message = null)
                                {
                                    if (offset != default(TimeSpan))
                                    {
                                        IsBetween(actual, expected.Subtract(offset), expected.Add(offset), message);
                        Severity: Major
                        Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
                        Edison.Framework/Asserts/Assert.cs on lines 509..521

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 99.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                public virtual IAssert AreTimesNotEqual(TimeSpan expected, TimeSpan actual, TimeSpan offset = default(TimeSpan), string message = null)
                                {
                                    if (offset != default(TimeSpan))
                                    {
                                        IsNotBetween(actual, expected.Subtract(offset), expected.Add(offset), message);
                        Severity: Major
                        Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
                        Edison.Framework/Asserts/Assert.cs on lines 495..507

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 99.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Method PopulateTestResultOnException has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                private TestResult PopulateTestResultOnException(MethodInfo testMethod, TestResult result, Exception ex, bool globalSetup, bool fixSetup, bool setup, bool teardown, bool test, TimeSpan time)
                        Severity: Major
                        Found in Edison.Engine/Threading/TestThread.cs - About 1 hr to fix

                          Method RunTests has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private void RunTests(List<string> tests, List<string> fixtures)
                                  {
                                      if (Assembly == default(Assembly) || (MainThread != default(Thread) && MainThread.ThreadState == ThreadState.Running))
                                      {
                                          return;
                          Severity: Minor
                          Found in Edison.GUI/Form1.cs - About 1 hr to fix

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                                    public virtual IAssert AreDatesNotEqual(DateTime expected, DateTime actual, int minuteOffset = 0, string message = null)
                                    {
                                        if (minuteOffset != 0)
                                        {
                                            IsNotBetween(actual, expected.AddMinutes(-minuteOffset), expected.AddMinutes(minuteOffset), message);
                            Severity: Major
                            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
                            Edison.Framework/Asserts/Assert.cs on lines 463..475

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 97.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                                    public virtual IAssert AreDatesEqual(DateTime expected, DateTime actual, int minuteOffset = 0, string message = null)
                                    {
                                        if (minuteOffset != 0)
                                        {
                                            IsBetween(actual, expected.AddMinutes(-minuteOffset), expected.AddMinutes(minuteOffset), message);
                            Severity: Major
                            Found in Edison.Framework/Asserts/Assert.cs and 1 other location - About 1 hr to fix
                            Edison.Framework/Asserts/Assert.cs on lines 477..489

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 97.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 10 locations. Consider refactoring.
                            Open

                                    [NUnit.Framework.Test]
                                    public void AreEqualIgnoreCaseTest()
                                    {
                                        var assert = GetAssert();
                            
                            
                            Severity: Major
                            Found in Edison.Framework.Test/Asserts/AssertTests.cs and 9 other locations - About 1 hr to fix
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 153..170
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 277..294
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 359..376
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 399..416
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 439..456
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 692..709
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 711..728
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 772..789
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 791..808

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 96.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 10 locations. Consider refactoring.
                            Open

                                    [NUnit.Framework.Test]
                                    public void ContainsTest()
                                    {
                                        var assert = GetAssert();
                            
                            
                            Severity: Major
                            Found in Edison.Framework.Test/Asserts/AssertTests.cs and 9 other locations - About 1 hr to fix
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 153..170
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 237..254
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 359..376
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 399..416
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 439..456
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 692..709
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 711..728
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 772..789
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 791..808

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 96.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 10 locations. Consider refactoring.
                            Open

                                    [NUnit.Framework.Test]
                                    public void IsLessThanTest()
                                    {
                                        var assert = GetAssert();
                            
                            
                            Severity: Major
                            Found in Edison.Framework.Test/Asserts/AssertTests.cs and 9 other locations - About 1 hr to fix
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 153..170
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 237..254
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 277..294
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 359..376
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 399..416
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 439..456
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 692..709
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 711..728
                            Edison.Framework.Test/Asserts/AssertTests.cs on lines 791..808

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 96.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Severity
                            Category
                            Status
                            Source
                            Language