GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Trent's Tech Tips

This view

  • Original page
  • New address

GeezerVison is showing apextips.blogspot.com — Correctly classifying PL/SQL source code on GitHub

Correctly classifying PL/SQL source code on GitHub

  • Get link
  • Facebook
  • X
  • Pinterest
  • Email
  • Other Apps
September 10, 2019
GitHub provides an engine that classifies source code that takes into account various factors, so may not always get it right. When it comes to relational database development, a common file extension would be .sql. However, with many different relational databases, it can be hard to determine which is the correct RDBMS the code relates to.

A case in point is a repository I came across, has the following classifications:




However, I happen to know in this scenario all source code directly relates to an Oracle database and such I believe all should be classified as PL/SQL.

So, how can we solve this dilemma for accurate reporting?

The engine for determining the language is under the package linguist. Within that repository there is a section Override which explains how you can override the chosen language very easily.

As it explains, create a file in the root of your repository if you don't already have one, .gitattributes, and specify the linguist-language property to that of any file extensions that are being miscategorised.

So, within that file, to clasify all sql files as PL/SQL code, create a line that looks like this:

*.sql linguist-language=PLSQL


After this change, this repository will start reporting the correct language:



Not only is this good for showing useful file stats within the repository, but the project will now have that source type as the primary language - so if I'm searching for some code, I could specify the language - and my project will be returned (before, it was classified as TSQL so wasn't being returned in this search)






  • Get link
  • Facebook
  • X
  • Pinterest
  • Email
  • Other Apps

Popular posts from this blog

Installing Oracle Instant Client on Ubuntu

September 05, 2019
Now that Oracle has enabled us to download instant client without any click through for accepting the license , I wanted to revisit a seamless install of the instant client on a new set up. Ubuntu has the documentation about installing the instant client here: https://help.ubuntu.com/community/Oracle%20Instant%20Client. First - because Oracle provides their releases in RPM archive format (or a tarball), in order to have an installer you need to create a DEB archive. There is a package in the archives, alien, which aids this process. This gives the start of the script: #!/bin/bash # Install dependencies sudo apt install alien The 3 packages the Ubuntu documentation tells us to retrieve are: - devel - basic (I opt for basiclite instead) - sqlplus So, over at the downloads page: https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html we can grab the link. # Download files. Example specific to 19.3 # Some links were not correct on the do...
Read more

A Universal Theme Adventure: Header Height

September 29, 2020
Image
This will be the first post in a series of posts covering some aspects of working with universal theme, where I hope to explore some more of Universal Theme and broaden my knowledge in the process. What first? I want to change the height of the header bar. To get started I create a brand new application - accepting any and all defaults. Any changes to a design/theme usually begins with Theme Roller, so first off: Theme Roller The first, and most obvious way is to leverage Theme Roller. Running the application, in the developer toolbar and select Theme Roller off to the right.  Within Theme Roller, there is one section titled Layout. This gives us a number of options, one of which is Header Height:   This gives us a slide with some preset options between 40 and 80 pixels, with increments of 4 pixels. (It's worth a brief mention that this range is defined from the Input Parameter File URLs given by the path: #THEME_IMAGES#less/theme/Vita.less, in the theme settings). As you ad...
Read more

Attaching a second VNIC card to compute in OCI

October 17, 2019
Image
Well, just under 30 days ago, Oracle announced a series of resources you can use in OCI for free. One thing that had stopped me signing up and trying out OCI in the past was that I wanted to make the best use of the free credits, and knowing I wouldn't get a full chance to try things out in the 30 days, I didn't want to sign up prematurely. Now that they offer some free resources, this prompted me to sign up. I am now at the end of the 30-day period where I have some credits to use non-free resources. One final thing I wanted to try out was attaching multiple VNIC (Virtual network interface card) to a single compute instance. One use-case of these is that you may want a machine accessible in 2 different networks. It's not just a matter of attaching it in the OCI console - to bring the interface up you have to perform a couple of extra steps. When I was first trying this, I didn't read the docs and figured I would just have to edit the interface config script and bri...
Read more
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.