Similar blocks of code found in 2 locations. Consider refactoring. Open
it "calculates the context for multinode annotations" do
quote = "ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam"\
" erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex"\
" ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum"\
" dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril"\
- Read upRead up
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 33.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
it "calculates the context for multinode annotations 2" do
quote = "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla"\
" facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore"\
" te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant"\
" aeterno interesset at. Usu ea mundi tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo"
- Read upRead up
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 33.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Line is too long. [134/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nExpetenda tincidunt in sed, ex"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id.\n\nHis audiam</span>deserunt in, eum"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum"\
- Exclude checks
Line is too long. [135/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
"Expetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi"\
- Exclude checks
Line is too long. [133/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper"\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
context = "Lorem <span class=annotator-hl>ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt"\
- Exclude checks
Line is too long. [133/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute"\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
quote = "ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam"\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit"\
- Exclude checks
Line is too long. [120/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" ea. Per ne impedit iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id."\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui"\
- Exclude checks
Line is too long. [133/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex"\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of"\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" works. <span class=annotator-hl>By contrast, our General Public Licenses are intended to guarantee your freedom to share"\
- Exclude checks
Line is too long. [120/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" aeterno interesset at. Usu ea mundi tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo"
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" accessible server, gives the public access to the source code of the modified version.\r\n\r\nAn older license, called the"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" program--to make sure it remains free software for all its users.\r\n\r\nWhen we speak of free software, we are referring to"\
- Exclude checks
Line is too long. [135/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut"\
- Exclude checks
Line is too long. [102/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id."
- Exclude checks
Line is too long. [133/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" software for all its users.\r\n\r\nWhen we speak of free software, we are referring to freedom, not price. Our General"\
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" and change all versions of a program--to make sure it remains free software for all its users.\r\n\r\nWhen we speak of"\
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" source code becomes available to the community. It requires the operator of a network server to provide the source code of"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" ubique voluptatibus te. In reque dicta usu. Ne rebum dissentiet eam, vim omnis deseruisse id. Ullum deleniti vituperata at"\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free"\
- Exclude checks
Line is too long. [134/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant"\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" aliquip ex ea commodo consequat. <span class=annotator-hl>Duis autem vel eum iriure dolor in hendrerit in vulputate velit"\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" legal permission to copy, distribute and/or modify the software.\r\n\r\nA secondary benefit of defending all users' freedom"\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know"\
- Exclude checks
Line is too long. [133/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute"\
- Exclude checks
Line is too long. [135/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you"\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" permits making a modified version and letting the public access it on a server without ever releasing its source code to the"\
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" to ensure cooperation with the community in the case of network server software.\r\n\r\nThe licenses for most software and"\
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
quote = "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" public.\r\n\r\nThe GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" aliquando ius ex. Ea aperiri sententiae duo</span>. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license,"\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
body = "The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed"\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this"\
- Exclude checks
Line is too long. [139/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" of it in new free programs, and that you know you can do these things.\r\n\r\nDevelopers that use our General Public Licenses"\
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" is that improvements made in alternate versions of the program, if they receive widespread use, become available for other"\
- Exclude checks
Line is too long. [132/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
quote = "By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a"\
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
context = "The licenses for most software and other practical works are designed to take away your freedom to share and change the"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have"\
- Exclude checks
Line is too long. [140/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" quo, insolens complectitur te eos, ea pri dico munere propriae. Vel ferri facilis ut, qui paulo ridens praesent ad. Possim"\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
context = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna"\
- Exclude checks
Line is too long. [133/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation."\
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
" the freedom to distribute copies of free software (and charge for them if you wish)</span>, that you receive source code"\
- Exclude checks