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

Dart acronym #186

Merged
merged 2 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
- [rna-transcription](./rna-transcription/README.md)
- [triangle](./triangle/README.md)
- [phone-number](./phone-number/README.md)
- [acronym](./acronym/README.md)
22 changes: 22 additions & 0 deletions dart/acronym/.exercism/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"authors": [
"Stargator"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"lib/acronym.dart"
],
"test": [
"test/acronym_test.dart"
],
"example": [
".meta/lib/example.dart"
]
},
"blurb": "Convert a long phrase to its acronym.",
"source": "Julien Vanier",
"source_url": "https://github.com/monkbroc"
}
1 change: 1 addition & 0 deletions dart/acronym/.exercism/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"track":"dart","exercise":"acronym","id":"c724999a59404d2a965d61faf4dd17fd","url":"https://exercism.org/tracks/dart/exercises/acronym","handle":"vpayno","is_requester":true,"auto_approve":false}
37 changes: 37 additions & 0 deletions dart/acronym/HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Help

## Running the tests

To run the tests:

```sh
$ dart test
```

## Submitting your solution

You can submit your solution using the `exercism submit lib/acronym.dart` command.
This command will upload your solution to the Exercism website and print the solution page's URL.

It's possible to submit an incomplete solution which allows you to:

- See how others have completed the exercise
- Request help from a mentor

## Need to get help?

If you'd like help solving the exercise, check the following pages:

- The [Dart track's documentation](https://exercism.org/docs/tracks/dart)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)

Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.

To get help if you're having trouble, you can use one of the following resources:

- [Dart API Documentation](https://api.dart.dev/)
- [Dart Gitter Chat](https://gitter.im/dart-lang/home)
- [Community Information](https://www.dart.dev/community)
- [/r/dartlang](https://www.reddit.com/r/dartlang) is the Dart subreddit.
- [StackOverflow](https://stackoverflow.com/questions/tagged/dart) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions.
41 changes: 41 additions & 0 deletions dart/acronym/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Acronym

Welcome to Acronym on Exercism's Dart Track.
If you need help running the tests or submitting your code, check out `HELP.md`.

## Instructions

Convert a phrase to its acronym.

Techies love their TLA (Three Letter Acronyms)!

Help generate some jargon by writing a program that converts a long name like Portable Network Graphics to its acronym (PNG).

Punctuation is handled as follows: hyphens are word separators (like whitespace); all other punctuation can be removed from the input.

For example:

|Input|Output|
|-|-|
|As Soon As Possible|ASAP|
|Liquid-crystal display|LCD|
|Thank George It's Friday!|TGIF|

## Source

### Created by

- @Stargator

### Contributed to by

- @kytrinyx

### Based on

Julien Vanier - https://github.com/monkbroc

### My Solution

- [my solution](./lib/acronym.dart)
- [run-tests](./run-tests-dart.txt)
18 changes: 18 additions & 0 deletions dart/acronym/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
errors:
unused_element: error
unused_import: error
unused_local_variable: error
dead_code: error

linter:
rules:
# Error Rules
- avoid_relative_lib_imports
- avoid_types_as_parameter_names
- literal_only_boolean_expressions
- no_adjacent_strings_in_list
- valid_regexps
1 change: 1 addition & 0 deletions dart/acronym/coverage/coverage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"CodeCoverage","coverage":[{"source":"package:acronym/acronym.dart","script":{"type":"@Script","fixedId":true,"id":"libraries/1/scripts/package%3Aacronym%2Facronym.dart","uri":"package:acronym/acronym.dart","_kind":"library"},"hits":[7,1,8,1,9,2,10,2,11,5,12,1]}]}
10 changes: 10 additions & 0 deletions dart/acronym/coverage/lcov.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SF:/home/vpayno/git_vpayno/exercism-workspace/dart/acronym/lib/acronym.dart
DA:7,2
DA:8,2
DA:9,4
DA:10,4
DA:11,10
DA:12,2
LF:6
LH:6
end_of_record
Binary file added dart/acronym/coverage/report/amber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dart/acronym/coverage/report/emerald.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading