• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • Cobertura
  • Patches

Don't try to color non-Java code by syntax

Brought to you by: christ66, dennislundberg, hauserx, jthomerson, lewijw
  • Summary
  • Files
  • Reviews
  • Support
  • Wiki
  • Mailing Lists
  • Tickets ▾
    • Patches
    • Feature Requests
    • Bugs
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • Unstable_(example)

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#102 Don't try to color non-Java code by syntax

open
nobody
None
5
2011-05-20
2011-05-20
Jouni K Seppänen
No

(This addresses partially the same problem as #3304991 in a different way, but IMHO both are worth applying.)

Since Cobertura is implemented via instrumenting class files, it is to some degree usable for JVM languages other than Java. However, applying Java code colorization to non-Java code will result in nonsensical output. It is better to view e.g. Clojure source without any colorization than with mistaken colorization. This patch looks at the filename of the source file, and if it does not end in .java, does not attempt to apply colorization.

The copyright to this patch belongs to my employer, ZenRobotics Ltd., and I have received permission to submit the patch to Cobertura. The patch is against Subversion branch v1_9_4.

Discussion

  • Jouni K Seppänen

    Jouni K Seppänen - 2011-05-20
     
    0002-Don-t-try-to-color-non-Java-code-by-syntax.patch
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    225 Broadway Suite 1600
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.