Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FreeBasic language #4998

Merged
merged 55 commits into from Apr 8, 2021
Merged

Added FreeBasic language #4998

merged 55 commits into from Apr 8, 2021

Conversation

XusinboyBekchanov
Copy link
Contributor

@XusinboyBekchanov XusinboyBekchanov commented Sep 6, 2020

I added FreeBasic language. Please see this.

Description

Checklist:

I added FreeBasic language. Please see this.
@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Sep 6, 2020

What should I do? I did not understand.

Copy link
Member

@lildude lildude left a comment

What should I do? I did not understand.

  1. fill "I am adding a new language." section of the template in the OP. You can remove the other sections. Pay special attention to providing search results for all the extensions you're adding. If you don't meet the documented popularity requirements, the extension can't be added.

  2. review the test failures. Most of these test failures are quite clear as to what the problems are and what you need to do to address them. Start with following those tips and explanations.

  3. you're adding the .inc extension which, assuming it meets the popularity requirements specifically for FreeBasic, is already extensively used on GitHub and associated with several other languages too, so you will need to write a heuristic (ie a regex) that identifies FreeBasic .inc files from the other languages and add it to this section:

- extensions: ['.inc']
rules:
- language: Motorola 68K Assembly
named_pattern: m68k
- language: PHP
pattern: '^<\?(?:php)?'
- language: SourcePawn
pattern: '^public\s+(?:SharedPlugin(?:\s+|:)__pl_\w+\s*=(?:\s*{)?|(?:void\s+)?__pl_\w+_SetNTVOptional\(\)(?:\s*{)?)'
- language: NASL
pattern:
- '^\s*include\s*\(\s*(?:"|'')[\\/\w\-\.:\s]+\.(?:nasl|inc)\s*(?:"|'')\s*\)\s*;'
- '^\s*(?:global|local)_var\s+(?:\w+(?:\s*=\s*[\w\-"'']+)?\s*)(?:,\s*\w+(?:\s*=\s*[\w\-"'']+)?\s*)*+\s*;'
- '^\s*namespace\s+\w+\s*{'
- '^\s*object\s+\w+\s*(?:extends\s+\w+(?:::\w+)?)?\s*{'
- '^\s*(?:public\s+|private\s+|\s*)function\s+\w+\s*\([\w\s,]*\)\s*{'
- language: POV-Ray SDL
pattern: '^\s*#(declare|local|macro|while)\s'

More information is in the CONTRIBUTING.md file

@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Sep 10, 2020

I don't understand here yet

@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Sep 16, 2020

All checks passed, now you can commit. I only left .bi files

@lildude
Copy link
Member

lildude commented Sep 29, 2020

This PR still needs a sample FreeBasic .bi file.

There's also the issue with other .bi files on GitHub - https://github.com/search?type=code&q=extension%3Abi+NOT+nothack+size%3A%3E1

Most of those appear to be FreeBasic, but quite a few of those appear to be QBasic which means this PR will also need to add support for QBasic and a heuristic to differentiate between the two.

@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Sep 29, 2020

I did everything

@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Sep 30, 2020

I added .bas extension too.

@lildude lildude requested review from pchaigno and Alhadis Oct 26, 2020
@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Dec 16, 2020

No

What for?

@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Apr 7, 2021

How do you fix this conflict? I added BASIC to fix it, but the check does not go (Waiting for status to be reported).

@lildude
Copy link
Member

lildude commented Apr 7, 2021

I've fixed the merge conflicts for you. We might need to tweak things further, but we'll see once the tests have run.

@XusinboyBekchanov
Copy link
Contributor Author

XusinboyBekchanov commented Apr 7, 2021

I've fixed the merge conflicts for you. We might need to tweak things further, but we'll see once the tests have run.

Thank you.

lib/linguist/languages.yml Outdated Show resolved Hide resolved
test/test_heuristics.rb Outdated Show resolved Hide resolved
lildude
lildude approved these changes Apr 8, 2021
@lildude lildude merged commit 5b74a63 into github:master Apr 8, 2021
6 checks passed
Copy link

@ghost ghost left a comment

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants